summary refs log tree commit diff
path: root/pkgs/development/python-modules/findimports/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/findimports/default.nix')
-rw-r--r--pkgs/development/python-modules/findimports/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/findimports/default.nix b/pkgs/development/python-modules/findimports/default.nix
new file mode 100644
index 00000000000..44f1a29a8f2
--- /dev/null
+++ b/pkgs/development/python-modules/findimports/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, python
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "findimports";
+  version = "2.2.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "mgedmin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-p13GVDXDOzOiTnRgtF7UxN1vwZRMa7wVEXJQrFQV7RU=";
+  };
+
+  pythonImportsCheck = [
+    "findimports"
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+    ${python.interpreter} testsuite.py
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Module for the analysis of Python import statements";
+    homepage = "https://github.com/mgedmin/findimports";
+    license = with licenses; [ gpl2Only /* or */ gpl3Only ];
+    maintainers = with maintainers; [ fab ];
+  };
+}