From baccd57dd2c2656291372c6ad57581eae0fb600f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 May 2024 16:44:02 +0200 Subject: [PATCH 1/2] python312Packages.requirements-detector: refactor --- .../python-modules/requirements-detector/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/requirements-detector/default.nix b/pkgs/development/python-modules/requirements-detector/default.nix index aab180853d5a..ee5df7c6f4ad 100644 --- a/pkgs/development/python-modules/requirements-detector/default.nix +++ b/pkgs/development/python-modules/requirements-detector/default.nix @@ -29,12 +29,15 @@ buildPythonPackage rec { "astroid" ]; - nativeBuildInputs = [ + build-system = [ poetry-core + ]; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ astroid packaging toml @@ -51,10 +54,10 @@ buildPythonPackage rec { meta = with lib; { description = "Python tool to find and list requirements of a Python project"; - mainProgram = "detect-requirements"; homepage = "https://github.com/landscapeio/requirements-detector"; changelog = "https://github.com/landscapeio/requirements-detector/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ kamadorueda ]; + mainProgram = "detect-requirements"; }; } From 5f6fe961b9f7fd8831ff77ee41ee73e024844aef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 May 2024 16:57:21 +0200 Subject: [PATCH 2/2] python312Packages.requirements-detector: mark as broken Module doesn't work with astroid >= 3.0 https://github.com/landscapeio/requirements-detector/issues/48 --- .../python-modules/requirements-detector/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/requirements-detector/default.nix b/pkgs/development/python-modules/requirements-detector/default.nix index ee5df7c6f4ad..164500d3e218 100644 --- a/pkgs/development/python-modules/requirements-detector/default.nix +++ b/pkgs/development/python-modules/requirements-detector/default.nix @@ -7,7 +7,6 @@ , semver , pytestCheckHook , pythonOlder -, pythonRelaxDepsHook , toml }: @@ -25,18 +24,10 @@ buildPythonPackage rec { hash = "sha256-qmrHFQRypBJOI1N6W/Dtc5ss9JGqoPhFlbqrLHcb6vc="; }; - pythonRelaxDeps = [ - "astroid" - ]; - build-system = [ poetry-core ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; - dependencies = [ astroid packaging @@ -59,5 +50,7 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ kamadorueda ]; mainProgram = "detect-requirements"; + # https://github.com/landscapeio/requirements-detector/issues/48 + broken = versionAtLeast astroid.version "3"; }; }