at master 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 capstone, 6 packaging, 7 pyelftools, 8 tlsh, 9 setuptools, 10}: 11buildPythonPackage rec { 12 pname = "telfhash"; 13 version = "0.9.8"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "trendmicro"; 18 repo = "telfhash"; 19 rev = "v${version}"; 20 sha256 = "124zajv43wx9l8rvdvmzcnbh0xpzmbn253pznpbjwvygfx16gq02"; 21 }; 22 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 ''; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 capstone 35 pyelftools 36 tlsh 37 packaging 38 ]; 39 40 doCheck = false; # no tests 41 42 pythonImportsCheck = [ "telfhash" ]; 43 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 }; 51}