2024-06-29 04:44:21 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchzip,
|
|
|
|
python311Packages,
|
|
|
|
desktop-file-utils,
|
|
|
|
freecell-solver,
|
|
|
|
black-hole-solver,
|
|
|
|
_experimental-update-script-combinators,
|
|
|
|
gitUpdater,
|
2023-06-29 00:45:59 +00:00
|
|
|
}:
|
2017-11-24 00:03:22 +00:00
|
|
|
|
2024-06-29 04:44:21 +00:00
|
|
|
python311Packages.buildPythonApplication rec {
|
2024-02-08 06:41:00 +00:00
|
|
|
pname = "pysolfc";
|
2024-06-29 04:44:21 +00:00
|
|
|
version = "3.0.0";
|
2017-11-24 00:03:22 +00:00
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
src = fetchzip {
|
2024-02-08 06:41:00 +00:00
|
|
|
url = "mirror://sourceforge/pysolfc/PySolFC-${version}.tar.xz";
|
2024-06-29 04:44:21 +00:00
|
|
|
hash = "sha256-LPOm83K4bdzmmQskmAnSyYpz+5y9ktQAhYCkXpODYKI=";
|
2017-11-24 00:03:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-29 04:44:21 +00:00
|
|
|
cardsets = stdenv.mkDerivation rec {
|
|
|
|
pname = "pysol-cardsets";
|
|
|
|
version = "3.0";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "mirror://sourceforge/pysolfc/PySolFC-Cardsets-${version}.tar.bz2";
|
|
|
|
hash = "sha256-UP0dQjoZJg+iSKVOrWbkLj1KCzMWws8ZBVSBLly1a/Y=";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
cp -r $src $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2023-06-29 00:45:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-29 04:44:21 +00:00
|
|
|
music = stdenv.mkDerivation rec {
|
|
|
|
pname = "pysol-music";
|
|
|
|
version = "4.50";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "mirror://sourceforge/pysolfc/pysol-music-${version}.tar.xz";
|
|
|
|
hash = "sha256-sOl5U98aIorrQHJRy34s0HHaSW8hMUE7q84FMQAj5Yg=";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
cp -r $src $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2018-08-19 18:43:29 +00:00
|
|
|
};
|
|
|
|
|
2024-06-29 04:44:21 +00:00
|
|
|
propagatedBuildInputs = with python311Packages; [
|
2023-06-29 00:45:59 +00:00
|
|
|
tkinter
|
|
|
|
six
|
|
|
|
random2
|
|
|
|
configobj
|
|
|
|
pysol-cards
|
|
|
|
attrs
|
|
|
|
pycotap
|
2018-08-19 18:43:29 +00:00
|
|
|
# optional :
|
2023-06-29 00:45:59 +00:00
|
|
|
pygame
|
|
|
|
freecell-solver
|
2024-06-29 04:44:21 +00:00
|
|
|
black-hole-solver
|
2023-06-29 00:45:59 +00:00
|
|
|
pillow
|
2017-11-24 00:03:22 +00:00
|
|
|
];
|
|
|
|
|
2024-06-29 04:44:21 +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
|
2023-06-29 00:45:59 +00:00
|
|
|
cp -r $music/data/music $out/share/PySolFC
|
2017-11-24 00:03:22 +00:00
|
|
|
'';
|
|
|
|
|
2018-08-19 18:43:29 +00:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-29 04:44:21 +00:00
|
|
|
passthru.updateScript = _experimental-update-script-combinators.sequence (
|
|
|
|
# Needed in order to work around requirement that only one updater with features enabled is in sequence
|
|
|
|
map (updater: updater.command) [
|
|
|
|
(gitUpdater {
|
|
|
|
url = "https://github.com/shlomif/PySolFC.git";
|
|
|
|
rev-prefix = "pysolfc-";
|
|
|
|
})
|
|
|
|
(gitUpdater {
|
|
|
|
url = "https://github.com/shlomif/PySolFC-CardSets.git";
|
|
|
|
attrPath = "pysolfc.cardsets";
|
|
|
|
})
|
|
|
|
(gitUpdater {
|
|
|
|
url = "https://github.com/shlomif/pysol-music.git";
|
|
|
|
attrPath = "pysolfc.music";
|
|
|
|
})
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
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";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "pysol.py";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pysolfc.sourceforge.io";
|
2017-11-24 00:03:22 +00:00
|
|
|
license = licenses.gpl3;
|
2024-09-06 05:48:24 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-11-24 00:03:22 +00:00
|
|
|
};
|
|
|
|
}
|