From ee4b07bdd0f05059a0c2c12870d08ee70574dfc2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Jun 2022 18:14:41 +0200 Subject: [PATCH 1/2] python310Packages.pick. init at 1.2.0 --- .../python-modules/pick/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pick/default.nix diff --git a/pkgs/development/python-modules/pick/default.nix b/pkgs/development/python-modules/pick/default.nix new file mode 100644 index 000000000000..f69bd06ea82a --- /dev/null +++ b/pkgs/development/python-modules/pick/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pick"; + version = "1.2.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "wong2"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-9y9O6Iqo07Q+aPM6AvyvjAMQzZQOSpal92Qto8p8bzI="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pick" + ]; + + meta = with lib; { + description = "Module to create curses-based interactive selection list in the terminal"; + homepage = "https://github.com/wong2/pick"; + 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 c45f5516bb6d..bd98ca8a842a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6473,6 +6473,8 @@ in { piccata = callPackage ../development/python-modules/piccata { }; + pick = callPackage ../development/python-modules/pick { }; + pickleshare = callPackage ../development/python-modules/pickleshare { }; picos = callPackage ../development/python-modules/picos { }; From 4ecbbe38052e2d99884c4ac2422905c0032cdb7c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Jun 2022 18:28:08 +0200 Subject: [PATCH 2/2] atomic-operator: init at 0.8.5 --- .../security/atomic-operator/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/tools/security/atomic-operator/default.nix diff --git a/pkgs/tools/security/atomic-operator/default.nix b/pkgs/tools/security/atomic-operator/default.nix new file mode 100644 index 000000000000..c4e07b4d3418 --- /dev/null +++ b/pkgs/tools/security/atomic-operator/default.nix @@ -0,0 +1,54 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "atomic-operator"; + version = "0.8.5"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "swimlane"; + repo = pname; + rev = version; + hash = "sha256-fO8bvzeMdJVWlhpzdTmJo9mrT6iorsLqr/GPF9gvE70="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + attrs + certifi + chardet + charset-normalizer + fire + idna + paramiko + pick + pypsrp + pyyaml + requests + urllib3 + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "atomic_operator" + ]; + + disabledTests = [ + # Tests require network access + "test_download_of_atomic_red_team_repo" + "test_setting_input_arguments" + "test_config_parser" + ]; + + meta = with lib; { + description = "Tool to execute Atomic Red Team tests (Atomics)"; + homepage = "https://www.atomic-operator.com/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 280a79821a39..1ac60d0c16ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -255,6 +255,8 @@ with pkgs; authz0 = callPackage ../tools/security/authz0 { }; + atomic-operator = callPackage ../tools/security/atomic-operator { }; + avro-tools = callPackage ../development/tools/avro-tools { }; bacnet-stack = callPackage ../tools/networking/bacnet-stack {};