summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-04-25 16:46:53 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-04-25 16:46:53 +0200
commit1e59f05167538c6f87cdc428ce064beede2609c9 (patch)
tree0512430e9d7ae108f73c55cbb1afec9b0ad81cfd
parenta6633d255f20f932b3eb45eac2b03719aeb4d2d0 (diff)
downloadnixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar.gz
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar.bz2
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar.lz
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar.xz
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.tar.zst
nixpkgs-1e59f05167538c6f87cdc428ce064beede2609c9.zip
python3Packages.pilkit: 2.0 -> unstable-2022-02-17
-rw-r--r--pkgs/development/python-modules/pilkit/default.nix46
1 files changed, 29 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/pilkit/default.nix b/pkgs/development/python-modules/pilkit/default.nix
index bc21d6bf465..49a07000667 100644
--- a/pkgs/development/python-modules/pilkit/default.nix
+++ b/pkgs/development/python-modules/pilkit/default.nix
@@ -1,36 +1,48 @@
 { lib
 , buildPythonPackage
-, fetchPypi
-, pillow
-, nose_progressive
-, nose
+, fetchFromGitHub
 , mock
-, blessings
+, pillow
+, pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "pilkit";
-  version = "2.0";
+  version = "unstable-2022-02-17";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "ddb30c2f0198a147e56b151476c3bb9fe045fbfd5b0a0fa2a3148dba62d1559f";
+  src = fetchFromGitHub {
+    owner = "matthewwithanm";
+    repo = pname;
+    rev = "09ffa2ad33318ae5fd3464655c14c7f01ffc2097";
+    hash = "sha256-jtnFffKr0yhSv2jBmXzPa6iP2r41MbmGukfmnvgABhk=";
   };
 
-  preConfigure = ''
-    substituteInPlace setup.py --replace 'nose==1.2.1' 'nose'
-  '';
+  buildInputs = [
+    pillow
+  ];
 
-  # tests fail, see https://github.com/matthewwithanm/pilkit/issues/9
-  doCheck = false;
+  checkInputs = [
+    mock
+    pytestCheckHook
+  ];
 
-  buildInputs = [ pillow nose_progressive nose mock blessings ];
+  postPatch = ''
+    substituteInPlace tox.ini \
+      --replace " --cov --cov-report term-missing:skip-covered" ""
+  '';
+
+  pythonImportsCheck = [
+    "pilkit"
+  ];
 
   meta = with lib; {
-    homepage = "https://github.com/matthewwithanm/pilkit/";
     description = "A collection of utilities and processors for the Python Imaging Libary";
+    homepage = "https://github.com/matthewwithanm/pilkit/";
     license = licenses.bsd0;
     maintainers = with maintainers; [ domenkozar ];
   };
-
 }