python311Packages.whispers: refactor

This commit is contained in:
Fabian Affolter 2024-01-21 16:23:45 +01:00
parent b4ee3c3cc4
commit 20e3081583

View File

@ -12,22 +12,32 @@
, pytestCheckHook
, pythonOlder
, pyyaml
, setuptools
}:
buildPythonPackage rec {
pname = "whispers";
version = "2.2.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "adeptex";
repo = pname;
repo = "whispers";
rev = "refs/tags/${version}";
hash = "sha256-9vXku8BWJtlf+lmAcQ8a7qTisRNc+xVw0T0Eunc4lt4=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
astroid
beautifulsoup4
@ -44,11 +54,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
preCheck = ''
# Some tests need the binary available in PATH
export PATH=$out/bin:$PATH
@ -60,7 +65,8 @@ buildPythonPackage rec {
meta = with lib; {
description = "Tool to identify hardcoded secrets in static structured text";
homepage = "https://github.com/Skyscanner/whispers";
homepage = "https://github.com/adeptex/whispers";
changelog = "https://github.com/adeptex/whispers/releases/tag/${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};