push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
{
lib,
stdenv,
fetchzip,
python3Packages,
desktop-file-utils,
freecell-solver,
black-hole-solver,
_experimental-update-script-combinators,
gitUpdater,
}:
python3Packages.buildPythonApplication rec {
pname = "pysolfc";
version = "3.4.1";
format = "setuptools";
src = fetchzip {
url = "mirror://sourceforge/pysolfc/PySolFC-${version}.tar.xz";
hash = "sha256-jijrrWhj80n/XFKMFLptDZCsclIhdJHiTrX6CGjVju8=";
};
cardsets = stdenv.mkDerivation rec {
pname = "pysol-cardsets";
version = "3.1";
src = fetchzip {
url = "mirror://sourceforge/pysolfc/PySolFC-Cardsets-${version}.tar.bz2";
hash = "sha256-NyCnMlMZ6d5+IiyG4cVn/zlDlArLJSs0dIqZiD7Nv4M=";
};
installPhase = ''
runHook preInstall
cp -r $src $out
runHook postInstall
'';
};
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
'';
};
propagatedBuildInputs = with python3Packages; [
tkinter
six
random2
configobj
pysol-cards
attrs
pycotap
# optional :
pygame
freecell-solver
black-hole-solver
pillow
];
patches = [ ./pysolfc-datadir.patch ];
nativeBuildInputs = [ desktop-file-utils ];
postInstall = ''
mkdir $out/share/PySolFC/cardsets
cp -r $cardsets/* $out/share/PySolFC/cardsets
cp -r $music/data/music $out/share/PySolFC
'';
# No tests in archive
doCheck = false;
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";
})
]
);
meta = with lib; {
description = "Collection of more than 1000 solitaire card games";
mainProgram = "pysol.py";
homepage = "https://pysolfc.sourceforge.io";
license = licenses.gpl3;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,19 @@
diff --git a/pysollib/util.py b/pysollib/util.py
index 8de3f00..26f4bc7 100644
--- a/pysollib/util.py
+++ b/pysollib/util.py
@@ -110,13 +110,7 @@ class DataLoader:
head, tail = os.path.split(argv0)
if not head:
head = os.curdir
- # dir where placed startup script
- path.append(head)
- path.append(os.path.join(head, "data"))
- path.append(os.path.join(head, os.pardir, "data"))
- # dir where placed pysol package
- path.append(os.path.join(sys.path[0], "data"))
- path.append(os.path.join(sys.path[0], "pysollib", "data"))
+ path.append(os.path.join(head, "..", "share", "PySolFC"))
# from settings.py
path.extend(DATA_DIRS)
# check path for valid directories