f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
51 lines
1,007 B
Nix
51 lines
1,007 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
capstone,
|
|
packaging,
|
|
pyelftools,
|
|
tlsh,
|
|
setuptools,
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "telfhash";
|
|
version = "0.9.8";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trendmicro";
|
|
repo = "telfhash";
|
|
rev = "v${version}";
|
|
sha256 = "124zajv43wx9l8rvdvmzcnbh0xpzmbn253pznpbjwvygfx16gq02";
|
|
};
|
|
|
|
# The tlsh library's name is just "tlsh"
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace-fail "python-tlsh" "tlsh" \
|
|
--replace-fail "py-tlsh" "tlsh" \
|
|
--replace-fail "nose>=1.3.7" ""
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
capstone
|
|
pyelftools
|
|
tlsh
|
|
packaging
|
|
];
|
|
|
|
doCheck = false; # no tests
|
|
|
|
pythonImportsCheck = [ "telfhash" ];
|
|
|
|
meta = with lib; {
|
|
description = "Symbol hash for ELF files";
|
|
mainProgram = "telfhash";
|
|
homepage = "https://github.com/trendmicro/telfhash";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|