`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / python-modules / telfhash / default.nix
blob18b67b6bf5022fc3e5eda29ed0d2d4c7a94a7718
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   capstone,
6   packaging,
7   pyelftools,
8   tlsh,
9   setuptools,
11 buildPythonPackage rec {
12   pname = "telfhash";
13   version = "0.9.8";
14   pyproject = true;
16   src = fetchFromGitHub {
17     owner = "trendmicro";
18     repo = "telfhash";
19     rev = "v${version}";
20     sha256 = "124zajv43wx9l8rvdvmzcnbh0xpzmbn253pznpbjwvygfx16gq02";
21   };
23   # The tlsh library's name is just "tlsh"
24   postPatch = ''
25     substituteInPlace requirements.txt \
26        --replace-fail "python-tlsh" "tlsh" \
27        --replace-fail "py-tlsh" "tlsh" \
28        --replace-fail "nose>=1.3.7" ""
29   '';
31   build-system = [ setuptools ];
33   dependencies = [
34     capstone
35     pyelftools
36     tlsh
37     packaging
38   ];
40   doCheck = false; # no tests
42   pythonImportsCheck = [ "telfhash" ];
44   meta = with lib; {
45     description = "Symbol hash for ELF files";
46     mainProgram = "telfhash";
47     homepage = "https://github.com/trendmicro/telfhash";
48     license = licenses.asl20;
49     maintainers = [ ];
50   };