diff options
author | lassulus <github@lassul.us> | 2024-02-25 23:53:14 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 23:53:14 +0700 |
commit | ef435713ef9b9d1ddf9da640066bb8c90cc5ad29 (patch) | |
tree | d6218ff1017f97d99ef625e3912e052254c2babe /pkgs/development/interpreters | |
parent | 147c28caad10707f517a3009f5892fb77bfb542f (diff) | |
parent | b1bccc25ec523b1d4f6508ccb750b91bc07bb473 (diff) | |
download | nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar.gz nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar.bz2 nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar.lz nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar.xz nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.tar.zst nixlib-ef435713ef9b9d1ddf9da640066bb8c90cc5ad29.zip |
Merge pull request #291371 from Yarny0/pythonCatchConflictsHook-recursion
pythonCatchConflictsHook: avoid infinite recursion
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py | 3 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook-tests.nix | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py index d4219192790b..ad679d9f9f99 100644 --- a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py +++ b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py @@ -57,7 +57,8 @@ def find_packages(store_path: Path, site_packages_path: str, parents: List[str]) with open(propagated_build_inputs, "r") as f: build_inputs: List[str] = f.read().strip().split(" ") for build_input in build_inputs: - find_packages(Path(build_input), site_packages_path, parents + [build_input]) + if build_input not in parents: + find_packages(Path(build_input), site_packages_path, parents + [build_input]) find_packages(out_path, site_packages_path, [f"this derivation: {out_path}"]) diff --git a/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook-tests.nix b/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook-tests.nix index f3d9235799e0..cba1034e0963 100644 --- a/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook-tests.nix +++ b/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook-tests.nix @@ -78,6 +78,15 @@ in { ]; }; + # multi-output derivation with dependency on itself must not crash + cyclic-dependencies = + generatePythonPackage { + pname = "cyclic-dependencies"; + preFixup = '' + propagatedBuildInputs+=("$out") + ''; + }; + # Simplest test case that should trigger a conflict catches-simple-conflict = let # this build must fail due to conflicts |