Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pkgs/development/python-modules/pycotap/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ stdenv, fetchPypi, python }:

python.pkgs.buildPythonPackage rec {
pname = "pycotap";
version = "1.2.2";

src = fetchPypi {
inherit pname version;
sha256 = "f938ecd4931ccd19d9598fb633d5eabb7938f08b84717315e52526aa6277c9ec";
};

meta = with stdenv.lib; {
homepage = "https://el-tramo.be/pycotap";
description = "A tiny test runner that outputs TAP results to standard output";
license = licenses.mit;
maintainers = with maintainers; [ genesis ];
};

}
25 changes: 25 additions & 0 deletions pkgs/development/python-modules/pysol_cards/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ stdenv, fetchPypi, python }:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is in python-modules, you should import the individual packages from the python package set, or else everything will be fixed to python2, and it create incoherence in some environments.

Suggested change
{ stdenv, fetchPypi, python }:
{ stdenv, fetchPypi, buildPythonPackage, pbr, random2, six }:


python.pkgs.buildPythonPackage rec {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python.pkgs.buildPythonPackage rec {
buildPythonPackage rec {

pname = "pysol_cards";
version = "0.8.8";

src = fetchPypi {
inherit pname version;
sha256 = "0w0waj7r1kqlpic6g3pyg4208i393gc0zxb6n6k0vqhm6nivdcs5";
};

propagatedBuildInputs = with python.pkgs; [ pbr random2 six ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
propagatedBuildInputs = with python.pkgs; [ pbr random2 six ];
propagatedBuildInputs = [ pbr random2 six ];


## Need to fix test deps, relies on stestr and a few other packages that aren't available on nixpkgs
#checkInputs = with python.pkgs; [ pbr testtools stestr ];
doCheck = false;
Comment on lines +14 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe stestr suites are also able to be ran with pytest.

Suggested change
## Need to fix test deps, relies on stestr and a few other packages that aren't available on nixpkgs
#checkInputs = with python.pkgs; [ pbr testtools stestr ];
doCheck = false;
## Need to fix test deps, relies on stestr and a few other packages that aren't available on nixpkgs
checkInputs = [ testtools pytest ];
doCheck = "pytest";


meta = with stdenv.lib; {
homepage = "https://github.com/shlomif/pysol_cards";
description = "Allow the python developer to generate the initial deals of some PySol FC games";
license = licenses.mit; # expat version
maintainers = with maintainers; [ genesis ];
};

}
29 changes: 11 additions & 18 deletions pkgs/games/pysolfc/default.nix
Original file line number Diff line number Diff line change
@@ -1,44 +1,37 @@
{ stdenv, fetchzip, buildPythonApplication, python3Packages
, desktop-file-utils, freecell-solver }:
, freecell-solver }:

buildPythonApplication rec {
pname = "PySolFC";
version = "2.6.4";
version = "2.8.0";

src = fetchzip {
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC/PySolFC-${version}/PySolFC-${version}.tar.xz";
sha256 = "1bd84law5b1yga3pryggdvlfvm0l62gci2q8y3q79cysdk3z4w3z";
sha256 = "01j7lyp7hbybmvph2ww67a6jp455a5ln7pzbs9d1762r323yz5sy";
};

cardsets = fetchzip {
url = "https://versaweb.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/PySolFC-Cardsets-2.0/PySolFC-Cardsets-2.0.tar.bz2";
sha256 = "0h0fibjv47j8lkc1bwnlbbvrx2nr3l2hzv717kcgagwhc7v2mrqh";
};

postPatch = ''
sed -i s:/usr/share/PySolFC:$out/share/PySolFC: pysollib/settings.py
'';

dontUseSetuptoolsCheck = true;

propagatedBuildInputs = with python3Packages; [
tkinter six random2
# optional :
attrs configobj six random2 pysol_cards pycotap tkinter
# optional :
pygame freecell-solver pillow
];

patches = [
./pysolfc-datadir.patch
];

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 = ''
mkdir $out/share/PySolFC/cardsets
cp -r $cardsets/* $out/share/PySolFC/cardsets
'';

# No tests in archive
doCheck = false;

meta = with stdenv.lib; {
description = "A collection of more than 1000 solitaire card games";
homepage = https://pysolfc.sourceforge.io;
Expand Down
19 changes: 0 additions & 19 deletions pkgs/games/pysolfc/pysolfc-datadir.patch

This file was deleted.

4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4978,6 +4978,8 @@ in {

pycosat = callPackage ../development/python-modules/pycosat { };

pycotap = callPackage ../development/python-modules/pycotap { };

pycryptopp = callPackage ../development/python-modules/pycryptopp { };

pyct = callPackage ../development/python-modules/pyct { };
Expand Down Expand Up @@ -5128,6 +5130,8 @@ in {

pysocks = callPackage ../development/python-modules/pysocks { };

pysol_cards = callPackage ../development/python-modules/pysol_cards { };

python_fedora = callPackage ../development/python-modules/python_fedora {};

python-simple-hipchat = callPackage ../development/python-modules/python-simple-hipchat {};
Expand Down