2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchzip, buildPythonApplication, python3Packages
|
2018-08-19 18:43:29 +00:00
|
|
|
, desktop-file-utils, freecell-solver }:
|
2017-11-24 00:03:22 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "PySolFC";
|
2018-08-19 18:43:29 +00:00
|
|
|
version = "2.6.4";
|
2017-11-24 00:03:22 +00:00
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC/PySolFC-${version}/PySolFC-${version}.tar.xz";
|
|
|
|
sha256 = "1bd84law5b1yga3pryggdvlfvm0l62gci2q8y3q79cysdk3z4w3z";
|
2017-11-24 00:03:22 +00:00
|
|
|
};
|
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
cardsets = fetchzip {
|
|
|
|
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/PySolFC-Cardsets-2.0/PySolFC-Cardsets-2.0.tar.bz2";
|
|
|
|
sha256 = "0h0fibjv47j8lkc1bwnlbbvrx2nr3l2hzv717kcgagwhc7v2mrqh";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
tkinter six random2
|
|
|
|
# optional :
|
|
|
|
pygame freecell-solver pillow
|
2017-11-24 00:03:22 +00:00
|
|
|
];
|
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
patches = [
|
|
|
|
./pysolfc-datadir.patch
|
2017-11-24 00:03:22 +00:00
|
|
|
];
|
|
|
|
|
2018-08-19 18:43:29 +00: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 00:03:22 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2018-08-19 18:43:29 +00:00
|
|
|
mkdir $out/share/PySolFC/cardsets
|
|
|
|
cp -r $cardsets/* $out/share/PySolFC/cardsets
|
2017-11-24 00:03:22 +00:00
|
|
|
'';
|
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-24 00:03:22 +00:00
|
|
|
description = "A collection of more than 1000 solitaire card games";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pysolfc.sourceforge.io";
|
2017-11-24 00:03:22 +00:00
|
|
|
license = licenses.gpl3;
|
2020-11-17 16:50:53 +00:00
|
|
|
maintainers = with maintainers; [ kierdavis ];
|
2017-11-24 00:03:22 +00:00
|
|
|
};
|
|
|
|
}
|