git.iko.soy/typeable/nixpkgs
on master help sign in
python3.pkgs.telfhash: init at unstable-2021-01-29
commitc27cf06128c2551945397a56d3d0bfec9afb2899 authorCole Helbling <cole.e.helbling@outlook.com> dateThu 15 Apr 2021, 14:59 (6 years ago) parentcd0ffd3
2 files changed+51
pkgs/development/python-modules/telfhash/default.nix+49 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/telfhash/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, capstone
5+, pyelftools
6+, tlsh
7+, nose
8+}:
9+buildPythonPackage {
10+ pname = "telfhash";
11+ version = "unstable-2021-01-29";
12+
13+ src = fetchFromGitHub {
14+ owner = "trendmicro";
15+ repo = "telfhash";
16+ rev = "b5e398e59dc25a56a28861751c1fccc74ef71617";
17+ sha256 = "jNu6qm8Q/UyJVaCqwFOPX02xAR5DwvCK3PaH6Fvmakk=";
18+ };
19+
20+ # The tlsh library's name is just "tlsh"
21+ postPatch = ''
22+ substituteInPlace requirements.txt --replace "python-tlsh" "tlsh"
23+ '';
24+
25+ propagatedBuildInputs = [
26+ capstone
27+ pyelftools
28+ tlsh
29+ ];
30+
31+ checkInputs = [
32+ nose
33+ ];
34+
35+ checkPhase = ''
36+ nosetests
37+ '';
38+
39+ pythonImportsCheck = [
40+ "telfhash"
41+ ];
42+
43+ meta = with lib; {
44+ description = "Symbol hash for ELF files";
45+ homepage = "https://github.com/trendmicro/telfhash";
46+ license = licenses.asl20;
47+ maintainers = teams.determinatesystems.members;
48+ };
49+}
pkgs/top-level/python-packages.nix+2
@@ -8320,6 +8320,8 @@ in {
83208320
83218321 telethon-session-sqlalchemy = callPackage ../development/python-modules/telethon-session-sqlalchemy { };
83228322
8323+ telfhash = callPackage ../development/python-modules/telfhash { };
8324+
83238325 tempita = callPackage ../development/python-modules/tempita { };
83248326
83258327 tempora = callPackage ../development/python-modules/tempora { };