about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-02-28 11:56:20 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-02-28 11:56:20 +0100
commitba549fc0b99546fa7a3f442a333b8a638177e2fa (patch)
treed9df274b35f742aa113b5404ab9bba4c6c0bab6c /pkgs
parentef8c2381d71b81c8586dc59ca57f1d45444d3f19 (diff)
python3Packages.portpicker: fix build
- add pythonImportsCheck
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/portpicker/default.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/portpicker/default.nix b/pkgs/development/python-modules/portpicker/default.nix
index fd7bf7bc09c34..faf3b95816286 100644
--- a/pkgs/development/python-modules/portpicker/default.nix
+++ b/pkgs/development/python-modules/portpicker/default.nix
@@ -1,6 +1,8 @@
-{ buildPythonPackage
-, lib
+{ lib
+, buildPythonPackage
 , fetchPypi
+, psutil
+, pythonOlder
 }:
 
 buildPythonPackage rec {
@@ -8,15 +10,25 @@ buildPythonPackage rec {
   version = "1.5.0";
   format = "pyproject";
 
+  disabled = pythonOlder "3.7";
+
   src = fetchPypi {
     inherit pname version;
-    sha256 = "e13b148008adeb2793cf8b55bcd20fdcec4f763f2d3bf3c45f5e5e5d1df7d228";
+    hash = "sha256-4TsUgAit6yeTz4tVvNIP3OxPdj8tO/PEX15eXR330ig=";
   };
 
-  meta = {
-    description = "A library to choose unique available network ports.";
+  propagatedBuildInputs = [
+    psutil
+  ];
+
+  pythonImportsCheck = [
+    "portpicker"
+  ];
+
+  meta = with lib; {
+    description = "Library to choose unique available network ports";
     homepage = "https://github.com/google/python_portpicker";
-    license = lib.licenses.asl20;
-    maintainers = with lib.maintainers; [ danharaj ];
+    license = licenses.asl20;
+    maintainers = with maintainers; [ danharaj ];
   };
 }