From 526c112e84247bb482c194bc886bf68f584f8a6a Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 14 Aug 2022 09:32:26 +0200 Subject: [PATCH 1/2] python310Packages.psd-tools: Unbreak package --- .../python-modules/psd-tools/default.nix | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/psd-tools/default.nix b/pkgs/development/python-modules/psd-tools/default.nix index ae5c3e0ab1af..b832b7051e3c 100644 --- a/pkgs/development/python-modules/psd-tools/default.nix +++ b/pkgs/development/python-modules/psd-tools/default.nix @@ -1,27 +1,46 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27 +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy27 , docopt , pillow , enum34 +, scikitimage +, aggdraw +, pytestCheckHook +, ipython +, cython }: buildPythonPackage rec { pname = "psd-tools"; version = "1.9.21"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-BlfJnC03W0BEOr2Nav0Tj0fzjwAVlTPjyN0KmxxQMVI="; + src = fetchFromGitHub { + owner = "psd-tools"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-+nqN7DJHbr7XkfG0oUQkWcxv+krR8DlQndAQCvnBk3s="; }; + nativeBuildInputs = [ cython ]; + propagatedBuildInputs = [ + aggdraw docopt + ipython pillow - ] ++ lib.optionals isPy27 [ enum34 ]; + scikitimage + ]; - meta = { + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "psd_tools" ]; + + meta = with lib; { description = "Python package for reading Adobe Photoshop PSD files"; homepage = "https://github.com/kmike/psd-tools"; - license = lib.licenses.mit; - broken = true; # missing packbits from nixpkgs + license = licenses.mit; + maintainers = with maintainers; [ onny ]; }; } From 8952131b507d1c99f8fb5937a5fe13f255cdc907 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 14 Aug 2022 09:43:10 +0200 Subject: [PATCH 2/2] python310Packages.aggdraw: init at 1.3.15 --- .../python-modules/aggdraw/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/aggdraw/default.nix diff --git a/pkgs/development/python-modules/aggdraw/default.nix b/pkgs/development/python-modules/aggdraw/default.nix new file mode 100644 index 000000000000..7c4326db6415 --- /dev/null +++ b/pkgs/development/python-modules/aggdraw/default.nix @@ -0,0 +1,41 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pytest +, python +, pillow +, numpy +}: + +buildPythonPackage rec { + pname = "aggdraw"; + version = "1.3.15"; + + src = fetchFromGitHub { + owner = "pytroll"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-w3HlnsHYB0R+HZOXtzygC2RST3gllPI7SYtwSCVXhTU="; + }; + + checkInputs = [ + numpy + pillow + pytest + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} selftest.py + runHook postCheck + ''; + + pythonImportsCheck = [ "aggdraw" ]; + + meta = with lib; { + description = "High quality drawing interface for PIL"; + homepage = "https://github.com/pytroll/aggdraw"; + license = licenses.mit; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 51cbc01b565a..df10cfad3d58 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -235,6 +235,8 @@ in { agent-py = callPackage ../development/python-modules/agent-py { }; + aggdraw = callPackage ../development/python-modules/aggdraw { }; + aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { }; aio-geojson-generic-client = callPackage ../development/python-modules/aio-geojson-generic-client { };