Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / malduck / default.nix
blob0f15b6a1066cb5d36fb01c83e81598fe3b86d4bf
1 { lib
2 , buildPythonPackage
3 , capstone
4 , click
5 , cryptography
6 , dnfile
7 , fetchFromGitHub
8 , pefile
9 , pycryptodomex
10 , pyelftools
11 , pythonOlder
12 , pytestCheckHook
13 , typing-extensions
14 , yara-python
17 buildPythonPackage rec {
18   pname = "malduck";
19   version = "4.4.0";
20   format = "setuptools";
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "CERT-Polska";
26     repo = pname;
27     rev = "refs/tags/v${version}";
28     hash = "sha256-CXHbU1AudvOJrG9MKYDQXeEtwrJODRPQtK43dQzZASE=";
29   };
31   propagatedBuildInputs = [
32     capstone
33     click
34     cryptography
35     dnfile
36     pefile
37     pycryptodomex
38     pyelftools
39     typing-extensions
40     yara-python
41   ];
43   postPatch = ''
44     substituteInPlace requirements.txt \
45       --replace "pefile==2019.4.18" "pefile" \
46       --replace "dnfile==0.11.0" "dnfile"
47   '';
49   nativeCheckInputs = [
50     pytestCheckHook
51   ];
53   pythonImportsCheck = [
54     "malduck"
55   ];
57   meta = with lib; {
58     description = "Helper for malware analysis";
59     mainProgram = "malduck";
60     homepage = "https://github.com/CERT-Polska/malduck";
61     changelog = "https://github.com/CERT-Polska/malduck/releases/tag/v${version}";
62     license = with licenses; [ bsd3 ];
63     maintainers = with maintainers; [ fab ];
64   };