From db30191b78bb3ad82a2edc268a3e372be6aa9887 Mon Sep 17 00:00:00 2001 From: eyjhb Date: Tue, 10 May 2022 08:53:05 +0200 Subject: [PATCH] python3Packages.name-that-hash: init at 1.10 --- .../python-modules/name-that-hash/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/name-that-hash/default.nix diff --git a/pkgs/development/python-modules/name-that-hash/default.nix b/pkgs/development/python-modules/name-that-hash/default.nix new file mode 100644 index 000000000000..de073e502dc8 --- /dev/null +++ b/pkgs/development/python-modules/name-that-hash/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, click +, rich +}: + +buildPythonPackage rec { + pname = "name-that-hash"; + version = "1.10"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "HashPals"; + repo = pname; + rev = version; + hash = "sha256-3sddUPoC3NfKQzmNgqPf/uHaYN9VZBqsmV712uz1Phg="; + }; + + # TODO remove on next update which bumps rich + postPatch = '' + substituteInPlace pyproject.toml --replace 'rich = ">=9.9,<11.0"' 'rich = ">=9.9"' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + click + rich + ]; + + pythonImportsCheck = [ "name_that_hash" ]; + + meta = with lib; { + longDescription = "Don't know what type of hash it is? Name That Hash will name that hash type! Identify MD5, SHA256 and 300+ other hashes."; + description = "Module and CLI for the identification of hashes"; + homepage = "https://github.com/HashPals/Name-That-Hash"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c82544ce55bf..6049bcabbd18 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8660,6 +8660,8 @@ with pkgs; notable = callPackage ../applications/misc/notable { }; + nth = with python3Packages; toPythonApplication name-that-hash; + ntlmrecon = callPackage ../tools/security/ntlmrecon { }; numberstation = callPackage ../applications/misc/numberstation { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3fd57e228deb..2fef28c24d70 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5519,6 +5519,8 @@ in { names = callPackage ../development/python-modules/names { }; + name-that-hash = callPackage ../development/python-modules/name-that-hash { }; + nampa = callPackage ../development/python-modules/nampa { }; nanoleaf = callPackage ../development/python-modules/nanoleaf { };