diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2021-12-12 13:55:21 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2021-12-12 13:55:21 +0100 |
commit | 5e4b6df585a90f0661e953ae7583022b06ab8a24 (patch) | |
tree | 554de9ace55a03e6bc72d5aa55034bdaf440720c /pkgs/development/python-modules/ssdeep | |
parent | 5e4feb3c2da78853c87f29d97e34096facf5a10d (diff) |
python3Packages.ssdeep: enable tests
Diffstat (limited to 'pkgs/development/python-modules/ssdeep')
-rw-r--r-- | pkgs/development/python-modules/ssdeep/default.nix | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/ssdeep/default.nix b/pkgs/development/python-modules/ssdeep/default.nix index 510bbbac9518d..6ad339a083f52 100644 --- a/pkgs/development/python-modules/ssdeep/default.nix +++ b/pkgs/development/python-modules/ssdeep/default.nix @@ -1,33 +1,51 @@ { lib , buildPythonPackage -, fetchPypi -, pkgs , cffi +, fetchFromGitHub +, pytestCheckHook , six -, pytest -, pytest-runner +, ssdeep }: buildPythonPackage rec { pname = "ssdeep"; version = "3.4"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "0px8k4fjbkjb717bg2v7rjhm4iclrxzq7sh0hfqs55f4ddqi0m8v"; + src = fetchFromGitHub { + owner = "DinoTools"; + repo = "python-ssdeep"; + rev = version; + hash = "sha256-eAB4/HmPGj/ngHrqkOlY/kTdY5iUEBHxrsRYjR/RNyw="; }; - buildInputs = [ pkgs.ssdeep pytest-runner ]; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ cffi six ]; + buildInputs = [ + ssdeep + ]; - # tests repository does not include required files - doCheck = false; + propagatedBuildInputs = [ + cffi + six + ]; + + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace '"pytest-runner"' "" + ''; + + pythonImportsCheck = [ + "ssdeep" + ]; meta = with lib; { - homepage = "https://github.com/DinoTools/python-ssdeep"; description = "Python wrapper for the ssdeep library"; - license = licenses.lgpl3; + homepage = "https://github.com/DinoTools/python-ssdeep"; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ fab ]; }; - } |