depot/third_party/nixpkgs/pkgs/development/python-modules/telfhash/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

54 lines
943 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, capstone
, packaging
, pyelftools
, tlsh
, nose
}:
buildPythonPackage rec {
pname = "telfhash";
version = "0.9.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "trendmicro";
repo = "telfhash";
rev = "v${version}";
sha256 = "124zajv43wx9l8rvdvmzcnbh0xpzmbn253pznpbjwvygfx16gq02";
};
# The tlsh library's name is just "tlsh"
postPatch = ''
substituteInPlace requirements.txt \
--replace "python-tlsh" "tlsh" \
--replace "py-tlsh" "tlsh"
'';
propagatedBuildInputs = [
capstone
pyelftools
tlsh
packaging
];
nativeCheckInputs = [
nose
];
checkPhase = ''
nosetests
'';
pythonImportsCheck = [
"telfhash"
];
meta = with lib; {
description = "Symbol hash for ELF files";
homepage = "https://github.com/trendmicro/telfhash";
license = licenses.asl20;
maintainers = [ ];
};
}