From 09b5c88b9af3b34bbcfd71d61c9e87065ced9882 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 17 Jun 2022 10:43:45 +0200 Subject: [PATCH 1/2] python310Packages.crysp: init at 1.2 --- .../python-modules/crysp/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/crysp/default.nix diff --git a/pkgs/development/python-modules/crysp/default.nix b/pkgs/development/python-modules/crysp/default.nix new file mode 100644 index 000000000000..34f5d2c2f35c --- /dev/null +++ b/pkgs/development/python-modules/crysp/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, grandalf +, matplotlib +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "crysp"; + version = "1.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "bdcht"; + repo = pname; + rev = "v${version}"; + hash = "sha256-51SKS6OOXIFT1L3YICR6a4QGSz/rbB8V+Z0u0jMO474="; + }; + + propagatedBuildInputs = [ + grandalf + matplotlib + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" + ''; + + pythonImportsCheck = [ + "crysp" + ]; + + meta = with lib; { + description = "Module that provides crypto-related facilities"; + homepage = "https://github.com/bdcht/crysp"; + license = with licenses; [ gpl2Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 756545bb54c3..993b372f9d0c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2143,6 +2143,8 @@ in { cryptoparser = callPackage ../development/python-modules/cryptoparser { }; + crysp = callPackage ../development/python-modules/crysp { }; + crytic-compile = callPackage ../development/python-modules/crytic-compile { }; csrmesh = callPackage ../development/python-modules/csrmesh { }; From 0d095b3a0a4600e9d0fb5155fe87d02e2690ec7d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Sep 2022 08:50:46 +0200 Subject: [PATCH 2/2] amoco: init at 2.9.8 --- pkgs/tools/security/amoco/default.nix | 72 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/tools/security/amoco/default.nix diff --git a/pkgs/tools/security/amoco/default.nix b/pkgs/tools/security/amoco/default.nix new file mode 100644 index 000000000000..88f614e4c906 --- /dev/null +++ b/pkgs/tools/security/amoco/default.nix @@ -0,0 +1,72 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "amoco"; + version = "2.9.8"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "bdcht"; + repo = pname; + rev = "v${version}"; + hash = "sha256-3+1ssFyU7SKFJgDYBQY0kVjmTHOD71D2AjnH+4bfLXo="; + }; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = with python3.pkgs; [ + blessed + click + crysp + grandalf + pyparsing + tqdm + traitlets + ]; + + passthru.optional-dependencies = { + app = with python3.pkgs; [ + # ccrawl + ipython + prompt-toolkit + pygments + # pyside6 + z3 + ]; + }; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" + ''; + + pythonRelaxDeps = [ + "grandalf" + "crysp" + ]; + + pythonImportsCheck = [ + "amoco" + ]; + + disabledTests = [ + # AttributeError: 'str' object has no attribute '__dict__' + "test_func" + ]; + + meta = with lib; { + description = "Tool for analysing binaries"; + homepage = "https://github.com/bdcht/amoco"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ebeef52afc8..67615149c340 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2853,6 +2853,8 @@ with pkgs; inherit (androidenv.androidPkgs_9_0) platform-tools; }; + amoco = callPackage ../tools/security/amoco {}; + anbox = callPackage ../os-specific/linux/anbox { }; androidenv = callPackage ../development/mobile/androidenv {