1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, click
6, rich
7}:
8
9buildPythonPackage rec {
10 pname = "name-that-hash";
11 version = "1.11.0";
12 format = "pyproject";
13
14 src = fetchFromGitHub {
15 owner = "HashPals";
16 repo = pname;
17 rev = version;
18 hash = "sha256-zOb4BS3zG1x8GLXAooqqvMOw0fNbw35JuRWOdGP26/8=";
19 };
20
21 # TODO remove on next update which bumps rich
22 postPatch = ''
23 substituteInPlace pyproject.toml --replace 'rich = ">=9.9,<11.0"' 'rich = ">=9.9"'
24 '';
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 click
32 rich
33 ];
34
35 pythonImportsCheck = [ "name_that_hash" ];
36
37 meta = with lib; {
38 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.";
39 description = "Module and CLI for the identification of hashes";
40 homepage = "https://github.com/HashPals/Name-That-Hash";
41 license = with licenses; [ gpl3Plus ];
42 maintainers = with maintainers; [ eyjhb ];
43 };
44}