From 94f8f5edf7cf2f4d3d3fd9ea3c69cfbfd7f66e0c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Apr 2021 14:59:46 +0200 Subject: [PATCH 1/2] python3Packages.autoit-ripper: init at 1.0.1 --- .../python-modules/autoit-ripper/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/autoit-ripper/default.nix diff --git a/pkgs/development/python-modules/autoit-ripper/default.nix b/pkgs/development/python-modules/autoit-ripper/default.nix new file mode 100644 index 000000000000..2276241d25e9 --- /dev/null +++ b/pkgs/development/python-modules/autoit-ripper/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, lief +, pythonOlder +}: + +buildPythonPackage rec { + pname = "autoit-ripper"; + version = "1.0.1"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mbsrfa72n7y1vkm9jhwhn1z3k45jxrlgx58ia1l2bp6chnnn2zy"; + }; + + propagatedBuildInputs = [ + lief + ]; + + postPatch = '' + substituteInPlace requirements.txt --replace "lief==0.10.1" "lief>=0.10.1" + ''; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "autoit_ripper" ]; + + meta = with lib; { + description = "Python module to extract AutoIt scripts embedded in PE binaries"; + homepage = "https://github.com/nazywam/AutoIt-Ripper"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index adb4a4aa4038..4ac0d6e32a6e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -617,6 +617,8 @@ in { autograd = callPackage ../development/python-modules/autograd { }; + autoit-ripper = callPackage ../development/python-modules/autoit-ripper { }; + autologging = callPackage ../development/python-modules/autologging { }; automat = callPackage ../development/python-modules/automat { }; From d8c45d876ab08bcad5cf9f646c78c7e4d5c0f78c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Apr 2021 14:55:56 +0200 Subject: [PATCH 2/2] python3Packages.karton-autoit-ripper: init at 1.0.0 --- .../karton-autoit-ripper/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/karton-autoit-ripper/default.nix diff --git a/pkgs/development/python-modules/karton-autoit-ripper/default.nix b/pkgs/development/python-modules/karton-autoit-ripper/default.nix new file mode 100644 index 000000000000..d1f79f42a2ab --- /dev/null +++ b/pkgs/development/python-modules/karton-autoit-ripper/default.nix @@ -0,0 +1,46 @@ +{ lib +, autoit-ripper +, buildPythonPackage +, fetchFromGitHub +, karton-core +, malduck +, regex +}: + +buildPythonPackage rec { + pname = "karton-autoit-ripper"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "CERT-Polska"; + repo = pname; + rev = "v${version}"; + sha256 = "0vdsxkbjcr0inpcfjh45gl72ipzklkhgs06fdpkyy9y0cfx3zq7z"; + }; + + propagatedBuildInputs = [ + autoit-ripper + karton-core + malduck + regex + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "autoit-ripper==1.0.0" "autoit-ripper" \ + --replace "karton.core==4.0.4" "karton-core" \ + --replace "malduck==3.1.0" "malduck>=3.1.0" \ + --replace "regex==2020.2.20" "regex>=2020.2.20" + ''; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "karton.autoit_ripper" ]; + + meta = with lib; { + description = "AutoIt script ripper for Karton framework"; + homepage = "https://github.com/CERT-Polska/karton-autoit-ripper"; + 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 4ac0d6e32a6e..46b2601dfe5e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3555,6 +3555,8 @@ in { karton-asciimagic = callPackage ../development/python-modules/karton-asciimagic { }; + karton-autoit-ripper = callPackage ../development/python-modules/karton-autoit-ripper { }; + karton-classifier = callPackage ../development/python-modules/karton-classifier { }; karton-config-extractor = callPackage ../development/python-modules/karton-config-extractor { };