2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, fetchzip
|
|
|
|
, buildPythonApplication
|
|
|
|
, python3Packages
|
|
|
|
, desktop-file-utils
|
|
|
|
, freecell-solver
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2024-02-29 20:09:43 +00:00
|
|
|
pname = "pysolfc";
|
|
|
|
version = "2.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "mirror://sourceforge/pysolfc/PySolFC-${version}.tar.xz";
|
|
|
|
hash = "sha256-Deye7KML5G6RZkth2veVgPOWZI8gnusEvszlrPTAhag=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cardsets = fetchzip {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "mirror://sourceforge/pysolfc/PySolFC-Cardsets-2.2.tar.bz2";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-mWJ0l9rvn9KeZ9rCWy7VjngJzJtSQSmG8zGcYFE4yM0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
music = fetchzip {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "mirror://sourceforge/pysolfc/pysol-music-4.50.tar.xz";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-sOl5U98aIorrQHJRy34s0HHaSW8hMUE7q84FMQAj5Yg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2023-07-15 17:15:38 +00:00
|
|
|
tkinter
|
|
|
|
six
|
|
|
|
random2
|
|
|
|
configobj
|
|
|
|
pysol-cards
|
|
|
|
attrs
|
|
|
|
pycotap
|
2020-04-24 23:36:52 +00:00
|
|
|
# optional :
|
2023-07-15 17:15:38 +00:00
|
|
|
pygame
|
|
|
|
freecell-solver
|
|
|
|
pillow
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./pysolfc-datadir.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ desktop-file-utils ];
|
|
|
|
postPatch = ''
|
|
|
|
desktop-file-edit --set-key Icon --set-value ${placeholder "out"}/share/icons/pysol01.png data/pysol.desktop
|
|
|
|
desktop-file-edit --set-key Comment --set-value "${meta.description}" data/pysol.desktop
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir $out/share/PySolFC/cardsets
|
|
|
|
cp -r $cardsets/* $out/share/PySolFC/cardsets
|
2023-07-15 17:15:38 +00:00
|
|
|
cp -r $music/data/music $out/share/PySolFC
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A collection of more than 1000 solitaire card games";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pysol.py";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pysolfc.sourceforge.io";
|
|
|
|
license = licenses.gpl3;
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = with maintainers; [ kierdavis ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|