nixpkgs/pkgs/games/pysolfc/default.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, fetchzip, buildPythonApplication, python3Packages
2018-08-19 18:43:29 +00:00
, desktop-file-utils, freecell-solver }:
buildPythonApplication rec {
pname = "PySolFC";
version = "2.16.0";
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 = "sha256-kklB16IrDicxqMee1kbxtoqgwcSrMjCV4HP6GtnZxo8=";
};
2018-08-19 18:43:29 +00:00
cardsets = fetchzip {
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/PySolFC-Cardsets-2.1/PySolFC-Cardsets-2.1.tar.bz2";
sha256 = "sha256-0ji6jY7zJFaaaJdInaULKUou+u934RMzYjxVDGVHbE0=";
2018-08-19 18:43:29 +00:00
};
propagatedBuildInputs = with python3Packages; [
tkinter six random2 configobj
pysol-cards attrs pycotap
2018-08-19 18:43:29 +00:00
# optional :
pygame freecell-solver pillow
];
2018-08-19 18:43:29 +00:00
patches = [
./pysolfc-datadir.patch
];
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
'';
postInstall = ''
2018-08-19 18:43:29 +00:00
mkdir $out/share/PySolFC/cardsets
cp -r $cardsets/* $out/share/PySolFC/cardsets
'';
2018-08-19 18:43:29 +00:00
# No tests in archive
doCheck = false;
meta = with lib; {
description = "A collection of more than 1000 solitaire card games";
homepage = "https://pysolfc.sourceforge.io";
license = licenses.gpl3;
maintainers = with maintainers; [ kierdavis ];
};
}