ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
55 lines
973 B
Nix
55 lines
973 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";
|
|
mainProgram = "telfhash";
|
|
homepage = "https://github.com/trendmicro/telfhash";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|