1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cmake,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "tlsh";
11 version = "4.12.0";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "trendmicro";
16 repo = "tlsh";
17 tag = version;
18 hash = "sha256-Ht4LkcNmxPEvzFHXeS/XhPt/xo+0sE4RBcLCn9N/zwE=";
19 };
20
21 nativeBuildInputs = [ cmake ];
22
23 build-system = [ setuptools ];
24
25 # no test data
26 doCheck = false;
27
28 postConfigure = ''
29 cd ../py_ext
30 '';
31
32 pythonImportsCheck = [ "tlsh" ];
33
34 meta = with lib; {
35 description = "Trend Micro Locality Sensitive Hash";
36 homepage = "https://tlsh.org/";
37 changelog = "https://github.com/trendmicro/tlsh/releases/tag/${version}";
38 license = licenses.asl20;
39 };
40}