From 9ccbe2828af07d2b0b5b4c56defe5e0b46dc56ef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 16 Jun 2023 19:20:03 +0200 Subject: [PATCH] creds: init at 0.5 --- pkgs/tools/security/creds/default.nix | 43 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/tools/security/creds/default.nix diff --git a/pkgs/tools/security/creds/default.nix b/pkgs/tools/security/creds/default.nix new file mode 100644 index 00000000000..9f218f89bdd --- /dev/null +++ b/pkgs/tools/security/creds/default.nix @@ -0,0 +1,43 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "creds"; + version = "0.5"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "ihebski"; + repo = "DefaultCreds-cheat-sheet"; + rev = "refs/tags/creds-${version}"; + hash = "sha256-s9ja2geFTnul7vUlGI4Am+IG3C0igICf0whnyd3SHdQ="; + }; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "tinydb==4.3" "tinydb" \ + --replace "pathlib" "" + substituteInPlace creds \ + --replace "pathlib.Path(__file__).parent" "pathlib.Path.home()" + ''; + + propagatedBuildInputs = with python3.pkgs; [ + fire + prettytable + requests + tinydb + ]; + + # Project has no tests + doCheck = false; + + meta = with lib; { + description = "Tool to search a collection of default credentials"; + homepage = "https://github.com/ihebski/DefaultCreds-cheat-sheet"; + changelog = "https://github.com/ihebski/DefaultCreds-cheat-sheet/releases/tag/creds-${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25c408635a4..9b53bb570dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -712,6 +712,8 @@ with pkgs; credential-detector = callPackage ../tools/security/credential-detector { }; + creds = callPackage ../tools/security/creds { }; + credslayer = callPackage ../tools/security/credslayer { }; device-tree_rpi = callPackage ../os-specific/linux/device-tree/raspberrypi.nix { };