Merge pull request #282617 from fabaff/whispers-fix

python311Packages.whispers: add patch to support astroid > 3

authored by Fabian Affolter and committed by GitHub 5f52a388 8d6486af

+35 -8
+35 -8
pkgs/development/python-modules/whispers/default.nix
··· 4 , buildPythonPackage 5 , crossplane 6 , fetchFromGitHub 7 , jellyfish 8 , jproperties 9 , luhn ··· 12 , pytestCheckHook 13 , pythonOlder 14 , pyyaml 15 }: 16 17 buildPythonPackage rec { 18 pname = "whispers"; 19 version = "2.2.0"; 20 - format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "adeptex"; 26 - repo = pname; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-9vXku8BWJtlf+lmAcQ8a7qTisRNc+xVw0T0Eunc4lt4="; 29 }; 30 31 propagatedBuildInputs = [ 32 astroid 33 beautifulsoup4 ··· 44 pytestCheckHook 45 ]; 46 47 - postPatch = '' 48 - substituteInPlace setup.py \ 49 - --replace '"pytest-runner"' "" 50 - ''; 51 - 52 preCheck = '' 53 # Some tests need the binary available in PATH 54 export PATH=$out/bin:$PATH ··· 60 61 meta = with lib; { 62 description = "Tool to identify hardcoded secrets in static structured text"; 63 - homepage = "https://github.com/Skyscanner/whispers"; 64 license = with licenses; [ asl20 ]; 65 maintainers = with maintainers; [ fab ]; 66 };
··· 4 , buildPythonPackage 5 , crossplane 6 , fetchFromGitHub 7 + , fetchpatch 8 , jellyfish 9 , jproperties 10 , luhn ··· 13 , pytestCheckHook 14 , pythonOlder 15 , pyyaml 16 + , setuptools 17 }: 18 19 buildPythonPackage rec { 20 pname = "whispers"; 21 version = "2.2.0"; 22 + pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "adeptex"; 28 + repo = "whispers"; 29 rev = "refs/tags/${version}"; 30 hash = "sha256-9vXku8BWJtlf+lmAcQ8a7qTisRNc+xVw0T0Eunc4lt4="; 31 }; 32 33 + patches = [ 34 + # Support astroid > 3, https://github.com/adeptex/whispers/pull/117 35 + (fetchpatch { 36 + url = "https://github.com/adeptex/whispers/commit/ff25e81cb3d775e5fb186c2d135b77c27d9ed43a.patch"; 37 + hash = "sha256-jKm7fs04mGUD7MZYAA/3xt01e9knuLun3c3u8PlLebg="; 38 + }) 39 + (fetchpatch { 40 + url = "https://github.com/adeptex/whispers/commit/ba6a56dddb12d1cb62f94dd7659ba24fdc4363ee.patch"; 41 + hash = "sha256-eHWnXHT0lzS7BqneMqfvV3w6GfrCiTJ5i+av82J+fpk="; 42 + }) 43 + (fetchpatch { 44 + url = "https://github.com/adeptex/whispers/commit/8b7b1593eb86abfc09b3581d463fc7d0e06309dc.patch"; 45 + hash = "sha256-JcRdv5eIyXKWaVqbJZlYqiSieE4z0MKF4dvO/hRBBMs="; 46 + }) 47 + (fetchpatch { 48 + url = "https://github.com/adeptex/whispers/commit/71dcb614e4d9e0247afc50cd4214659739f8844e.patch"; 49 + hash = "sha256-7XIFuc8Rf2ValN3BoAJOjSqjgmiOauxCFonMgGljFg0="; 50 + }) 51 + ]; 52 + 53 + postPatch = '' 54 + substituteInPlace setup.py \ 55 + --replace '"pytest-runner"' "" 56 + ''; 57 + 58 + nativeBuildInputs = [ 59 + setuptools 60 + ]; 61 + 62 propagatedBuildInputs = [ 63 astroid 64 beautifulsoup4 ··· 75 pytestCheckHook 76 ]; 77 78 preCheck = '' 79 # Some tests need the binary available in PATH 80 export PATH=$out/bin:$PATH ··· 86 87 meta = with lib; { 88 description = "Tool to identify hardcoded secrets in static structured text"; 89 + homepage = "https://github.com/adeptex/whispers"; 90 + changelog = "https://github.com/adeptex/whispers/releases/tag/${version}"; 91 license = with licenses; [ asl20 ]; 92 maintainers = with maintainers; [ fab ]; 93 };