summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2022-12-11 18:25:35 +0000
committerGitHub <noreply@github.com>2022-12-11 18:25:35 +0000
commit9d9400ef7dcb1e693681faffa41df1982423379c (patch)
tree0315a56a920323c6ae6a9874aea7495d7cc5f5be
parentMerge pull request #205650 from r-ryantm/auto-update/python3.10-wakeonlan (diff)
parentpython310Packages.malduck: 4.2.0 -> 4.3.0 (diff)
downloadnixpkgs-9d9400ef7dcb1e693681faffa41df1982423379c.tar.gz
Merge pull request #205612 from fabaff/malduck-dump
python310Packages.malduck: 4.2.0 -> 4.3.0
-rw-r--r--pkgs/development/python-modules/dnfile/default.nix48
-rw-r--r--pkgs/development/python-modules/malduck/default.nix16
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 61 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/dnfile/default.nix b/pkgs/development/python-modules/dnfile/default.nix
new file mode 100644
index 000000000000..83ce068a760f
--- /dev/null
+++ b/pkgs/development/python-modules/dnfile/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pefile
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+ pname = "dnfile";
+ version = "0.12.0";
+ format = "setuptools";
+
+ disabled = pythonOlder "3.7";
+
+ src = fetchFromGitHub {
+ owner = "malwarefrank";
+ repo = pname;
+ rev = "refs/tags/v${version}";
+ hash = "sha256-r3DupEyMEXOFeSDo9k0LmGM/TGMbbpVW7zCoUA4oG8Y=";
+ fetchSubmodules = true;
+ };
+
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "pytest-runner" ""
+ '';
+
+ propagatedBuildInputs = [
+ pefile
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ pythonImportsCheck = [
+ "dnfile"
+ ];
+
+ meta = with lib; {
+ description = "Module to parse .NET executable files";
+ homepage = "hhttps://github.com/malwarefrank/dnfile";
+ changelog = "https://github.com/malwarefrank/dnfile/blob/v${version}/HISTORY.rst";
+ license = with licenses; [ mit ];
+ maintainers = with maintainers; [ fab ];
+ };
+}
diff --git a/pkgs/development/python-modules/malduck/default.nix b/pkgs/development/python-modules/malduck/default.nix
index 7d5998da2e96..d984328ac6b2 100644
--- a/pkgs/development/python-modules/malduck/default.nix
+++ b/pkgs/development/python-modules/malduck/default.nix
@@ -3,18 +3,20 @@
, capstone
, click
, cryptography
+, dnfile
, fetchFromGitHub
, pefile
, pycryptodomex
, pyelftools
, pythonOlder
+, pytestCheckHook
, typing-extensions
, yara-python
}:
buildPythonPackage rec {
pname = "malduck";
- version = "4.2.0";
+ version = "4.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@@ -23,13 +25,14 @@ buildPythonPackage rec {
owner = "CERT-Polska";
repo = pname;
rev = "refs/tags/v${version}";
- hash = "sha256-UgpblcZ/Jxl3U4256YIHzly7igNXwhTdFN4HOqZBVbM=";
+ hash = "sha256-1gwJhlhRLnh01AIJj07Wpba8X7V5AfACuJmZX+cfT6Y=";
};
propagatedBuildInputs = [
capstone
click
cryptography
+ dnfile
pefile
pycryptodomex
pyelftools
@@ -39,11 +42,13 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace requirements.txt \
- --replace "pefile==2019.4.18" "pefile"
+ --replace "pefile==2019.4.18" "pefile" \
+ --replace "dnfile==0.11.0" "dnfile"
'';
- # Project has no tests. They will come with the next release
- doCheck = false;
+ checkInputs = [
+ pytestCheckHook
+ ];
pythonImportsCheck = [
"malduck"
@@ -52,6 +57,7 @@ buildPythonPackage rec {
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}";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ffe00c954992..256f68b8a426 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2678,6 +2678,8 @@ self: super: with self; {
dnachisel = callPackage ../development/python-modules/dnachisel { };
+ dnfile = callPackage ../development/python-modules/dnfile { };
+
dnslib = callPackage ../development/python-modules/dnslib { };
dnspython = callPackage ../development/python-modules/dnspython { };