3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/malduck/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.2 KiB
Nix
Raw Normal View History

2021-04-14 22:18:09 +01:00
{ lib
, buildPythonPackage
, capstone
, click
, cryptography
, dnfile
2021-04-14 22:18:09 +01:00
, fetchFromGitHub
, pefile
, pycryptodomex
, pyelftools
, pythonOlder
, pytestCheckHook
2021-04-14 22:18:09 +01:00
, typing-extensions
, yara-python
}:
buildPythonPackage rec {
pname = "malduck";
version = "4.3.0";
2022-05-07 19:36:44 +01:00
format = "setuptools";
2021-04-14 22:18:09 +01:00
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "CERT-Polska";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-1gwJhlhRLnh01AIJj07Wpba8X7V5AfACuJmZX+cfT6Y=";
2021-04-14 22:18:09 +01:00
};
propagatedBuildInputs = [
capstone
click
cryptography
dnfile
2021-04-14 22:18:09 +01:00
pefile
pycryptodomex
pyelftools
typing-extensions
yara-python
];
2021-06-30 18:04:03 +01:00
postPatch = ''
substituteInPlace requirements.txt \
--replace "pefile==2019.4.18" "pefile" \
--replace "dnfile==0.11.0" "dnfile"
2021-06-30 18:04:03 +01:00
'';
checkInputs = [
pytestCheckHook
];
2021-06-30 18:04:03 +01:00
2022-05-07 19:36:44 +01:00
pythonImportsCheck = [
"malduck"
];
2021-04-14 22:18:09 +01:00
meta = with lib; {
description = "Helper for malware analysis";
homepage = "https://github.com/CERT-Polska/malduck";
changelog = "https://github.com/CERT-Polska/malduck/releases/tag/v${version}";
2021-04-14 22:18:09 +01:00
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}