depot/third_party/nixpkgs/pkgs/development/python-modules/whispers/default.nix
Default email 2ce5db779a Project import generated by Copybara.
GitOrigin-RevId: 48037fd90426e44e4bf03e6479e88a11453b9b66
2022-05-18 16:49:53 +02:00

65 lines
1.1 KiB
Nix

{ lib
, astroid
, beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, jproperties
, luhn
, lxml
, pytest-mock
, pytestCheckHook
, python-Levenshtein
, pythonOlder
, pyyaml
}:
buildPythonPackage rec {
pname = "whispers";
version = "1.5.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Skyscanner";
repo = pname;
rev = version;
hash = "sha256-jruUGyoZCyMu015QKtlvfx5WRMfxo/eYUue9wUIWb6o=";
};
propagatedBuildInputs = [
astroid
beautifulsoup4
jproperties
luhn
lxml
python-Levenshtein
pyyaml
];
checkInputs = [
pytest-mock
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
preCheck = ''
# Some tests need the binary available in PATH
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [
"whispers"
];
meta = with lib; {
description = "Tool to identify hardcoded secrets in static structured text";
homepage = "https://github.com/Skyscanner/whispers";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}