Merge pull request #150312 from fabaff/whispers

whispers: init at 1.5.3
This commit is contained in:
Fabian Affolter 2021-12-13 12:02:22 +01:00 committed by GitHub
commit b84064905a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 153 additions and 0 deletions

View file

@ -0,0 +1,59 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, six
, pytest-datadir
, setuptools-scm
}:
buildPythonPackage rec {
pname = "jproperties";
version = "2.1.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "Tblue";
repo = "python-jproperties";
rev = "v${version}";
sha256 = "sha256-O+ALeGHMNjW1dc9IRyLzO81k8DW2vbGjuZqXxgrhYjo=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
six
];
checkInputs = [
pytest-datadir
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "setuptools_scm ~= 3.3" "setuptools_scm"
substituteInPlace pytest.ini \
--replace "--cov=jproperties --cov-report=term --cov-report=html --cov-branch" ""
'';
disabledTestPaths = [
# TypeError: 'PosixPath' object...
"tests/test_simple_utf8.py"
];
pythonImportsCheck = [
"jproperties"
];
meta = with lib; {
description = "Java Property file parser and writer for Python";
homepage = "https://github.com/Tblue/python-jproperties";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "luhn";
version = "0.2.0";
src = fetchFromGitHub {
owner = "mmcloughlin";
repo = pname;
rev = version;
sha256 = "sha256-ZifaCjOVhWdXuzi5n6V+6eVN5vrEHKgUdpSOXoMyR18=";
};
checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [
"test.py"
];
pythonImportsCheck = [
"luhn"
];
meta = with lib; {
description = "Python module for generate and verify Luhn check digits";
homepage = "https://github.com/mmcloughlin/luhn";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,52 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "whispers";
version = "1.5.3";
src = fetchFromGitHub {
owner = "Skyscanner";
repo = pname;
rev = version;
sha256 = "sha256-jruUGyoZCyMu015QKtlvfx5WRMfxo/eYUue9wUIWb6o=";
};
propagatedBuildInputs = with python3.pkgs; [
astroid
beautifulsoup4
jproperties
luhn
lxml
python-Levenshtein
pyyaml
];
checkInputs = with python3.pkgs; [
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 ];
};
}

View file

@ -29161,6 +29161,8 @@ with pkgs;
wafw00f = python3Packages.callPackage ../tools/security/wafw00f { };
whispers = callPackage ../tools/security/whispers { };
waon = callPackage ../applications/audio/waon { };
w3m = callPackage ../applications/networking/browsers/w3m { };

View file

@ -4059,6 +4059,8 @@ in {
inherit (self) systemd pytest;
};
jproperties = callPackage ../development/python-modules/jproperties { };
jpylyzer = callPackage ../development/python-modules/jpylyzer { };
JPype1 = callPackage ../development/python-modules/JPype1 { };
@ -4619,6 +4621,8 @@ in {
luftdaten = callPackage ../development/python-modules/luftdaten { };
luhn = callPackage ../development/python-modules/luhn { };
luxor = callPackage ../development/python-modules/luxor { };
luxtronik = callPackage ../development/python-modules/luxtronik { };