summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-05-20 22:49:32 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-05-20 23:08:24 +0200
commit6895219b618c25e6db5d258105626d95ece4819f (patch)
treee2ce314b118798389a0621cf6ac4adbad70fc2b4
parent2a8f89575a005a72e487a7ecaab402bf2604f3ee (diff)
downloadnixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar.gz
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar.bz2
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar.lz
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar.xz
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.tar.zst
nixpkgs-6895219b618c25e6db5d258105626d95ece4819f.zip
python310Packages.requirements-detector: 0.7 -> 1.0.3
-rw-r--r--pkgs/development/python-modules/requirements-detector/default.nix47
1 files changed, 28 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/requirements-detector/default.nix b/pkgs/development/python-modules/requirements-detector/default.nix
index e8621429cea..fa1b381126e 100644
--- a/pkgs/development/python-modules/requirements-detector/default.nix
+++ b/pkgs/development/python-modules/requirements-detector/default.nix
@@ -1,43 +1,52 @@
-{ buildPythonPackage
-, fetchFromGitHub
-, isPy27
-, lib
-
-# pythonPackages
+{ lib
 , astroid
-, pytest
+, buildPythonPackage
+, fetchFromGitHub
+, packaging
+, poetry-core
+, poetry-semver
+, pytestCheckHook
+, pythonOlder
+, toml
 }:
 
 buildPythonPackage rec {
   pname = "requirements-detector";
-  version = "0.7";
-  disabled = isPy27;
+  version = "1.0.3";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "landscapeio";
     repo = pname;
     rev = version;
-    sha256 = "sha256-DdPNqbTsL2+GUp8vppqUSa0mUVMxk73MCcpwo8u51tU=";
+    hash = "sha256-AEXCguf5Q9lU5ygFJUlbc1F637hkQ0wJybbRK7uhB9s=";
   };
 
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
   propagatedBuildInputs = [
     astroid
+    packaging
+    poetry-semver
+    toml
   ];
 
   checkInputs = [
-    pytest
+    pytestCheckHook
   ];
 
-  checkPhase = ''
-    pytest
-  '';
+  pythonImportsCheck = [
+    "requirements_detector"
+  ];
 
-  meta = {
+  meta = with lib; {
     description = "Python tool to find and list requirements of a Python project";
     homepage = "https://github.com/landscapeio/requirements-detector";
-    license = lib.licenses.mit;
-    maintainers = with lib.maintainers; [
-      kamadorueda
-    ];
+    license = licenses.mit;
+    maintainers = with maintainers; [ kamadorueda ];
   };
 }