2023-06-29 02:45:59 +02:00
|
|
|
{ lib
|
|
|
|
, fetchzip
|
|
|
|
, buildPythonApplication
|
|
|
|
, python3Packages
|
|
|
|
, desktop-file-utils
|
|
|
|
, freecell-solver
|
|
|
|
}:
|
2017-11-24 01:03:22 +01:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "PySolFC";
|
2023-06-29 02:45:59 +02:00
|
|
|
version = "2.20.1";
|
2017-11-24 01:03:22 +01:00
|
|
|
|
2018-08-19 20:43:29 +02:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC/PySolFC-${version}/PySolFC-${version}.tar.xz";
|
2023-06-29 02:45:59 +02:00
|
|
|
hash = "sha256-mEnsq8Su0ses+nqoSFC+Wr0MHY7aTDMbtDV8toYVNPY=";
|
2017-11-24 01:03:22 +01:00
|
|
|
};
|
|
|
|
|
2018-08-19 20:43:29 +02:00
|
|
|
cardsets = fetchzip {
|
2023-06-29 02:45:59 +02:00
|
|
|
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/PySolFC-Cardsets-2.2/PySolFC-Cardsets-2.2.tar.bz2";
|
|
|
|
hash = "sha256-mWJ0l9rvn9KeZ9rCWy7VjngJzJtSQSmG8zGcYFE4yM0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
music = fetchzip {
|
|
|
|
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySol-Music/PySol-Music-4.50/pysol-music-4.50.tar.xz";
|
|
|
|
hash = "sha256-sOl5U98aIorrQHJRy34s0HHaSW8hMUE7q84FMQAj5Yg=";
|
2018-08-19 20:43:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2023-06-29 02:45:59 +02:00
|
|
|
tkinter
|
|
|
|
six
|
|
|
|
random2
|
|
|
|
configobj
|
|
|
|
pysol-cards
|
|
|
|
attrs
|
|
|
|
pycotap
|
2018-08-19 20:43:29 +02:00
|
|
|
# optional :
|
2023-06-29 02:45:59 +02:00
|
|
|
pygame
|
|
|
|
freecell-solver
|
|
|
|
pillow
|
2017-11-24 01:03:22 +01:00
|
|
|
];
|
|
|
|
|
2018-08-19 20:43:29 +02:00
|
|
|
patches = [
|
|
|
|
./pysolfc-datadir.patch
|
2017-11-24 01:03:22 +01:00
|
|
|
];
|
|
|
|
|
2018-08-19 20:43:29 +02:00
|
|
|
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
|
|
|
|
'';
|
2017-11-24 01:03:22 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2018-08-19 20:43:29 +02:00
|
|
|
mkdir $out/share/PySolFC/cardsets
|
|
|
|
cp -r $cardsets/* $out/share/PySolFC/cardsets
|
2023-06-29 02:45:59 +02:00
|
|
|
cp -r $music/data/music $out/share/PySolFC
|
2017-11-24 01:03:22 +01:00
|
|
|
'';
|
|
|
|
|
2018-08-19 20:43:29 +02:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-11-24 01:03:22 +01:00
|
|
|
description = "A collection of more than 1000 solitaire card games";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://pysolfc.sourceforge.io";
|
2017-11-24 01:03:22 +01:00
|
|
|
license = licenses.gpl3;
|
2020-11-17 17:50:53 +01:00
|
|
|
maintainers = with maintainers; [ kierdavis ];
|
2017-11-24 01:03:22 +01:00
|
|
|
};
|
|
|
|
}
|