python311Packages.malduck: refactor

This commit is contained in:
Fabian Affolter 2024-05-11 21:46:50 +02:00
parent d6ac5cabbb
commit a7c2e7306a

View File

@ -9,6 +9,7 @@
, pycryptodomex , pycryptodomex
, pyelftools , pyelftools
, pythonOlder , pythonOlder
, setuptools
, pytestCheckHook , pytestCheckHook
, typing-extensions , typing-extensions
, yara-python , yara-python
@ -17,18 +18,22 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "malduck"; pname = "malduck";
version = "4.4.1"; version = "4.4.1";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CERT-Polska"; owner = "CERT-Polska";
repo = pname; repo = "malduck";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-Btx0HxiZWrb0TDpBokQGtBE2EDK0htONe/DwqlPgAd4="; hash = "sha256-Btx0HxiZWrb0TDpBokQGtBE2EDK0htONe/DwqlPgAd4=";
}; };
propagatedBuildInputs = [ build-system = [
setuptools
];
dependencies = [
capstone capstone
click click
cryptography cryptography
@ -40,12 +45,6 @@ buildPythonPackage rec {
yara-python yara-python
]; ];
postPatch = ''
substituteInPlace requirements.txt \
--replace "pefile==2019.4.18" "pefile" \
--replace "dnfile==0.11.0" "dnfile"
'';
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
]; ];
@ -56,10 +55,10 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Helper for malware analysis"; description = "Helper for malware analysis";
mainProgram = "malduck";
homepage = "https://github.com/CERT-Polska/malduck"; homepage = "https://github.com/CERT-Polska/malduck";
changelog = "https://github.com/CERT-Polska/malduck/releases/tag/v${version}"; changelog = "https://github.com/CERT-Polska/malduck/releases/tag/v${version}";
license = with licenses; [ bsd3 ]; license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ]; maintainers = with maintainers; [ fab ];
mainProgram = "malduck";
}; };
} }