From f84db6dceee5fc7d6801153638825cc6c8b8073e Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 12:28:47 -0400 Subject: [PATCH] pythonPackges.tlsh: refacotr move to python-modules --- .../python-modules/tlsh/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +------------ 2 files changed, 38 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/tlsh/default.nix diff --git a/pkgs/development/python-modules/tlsh/default.nix b/pkgs/development/python-modules/tlsh/default.nix new file mode 100644 index 000000000000..893fe0240b60 --- /dev/null +++ b/pkgs/development/python-modules/tlsh/default.nix @@ -0,0 +1,37 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, pkgs +}: + +buildPythonPackage rec { + pname = "tlsh"; + version = "3.4.5"; + + src = fetchFromGitHub { + owner = "trendmicro"; + repo = "tlsh"; + rev = "22fa9a62068b92c63f2b5a87004a7a7ceaac1930"; + sha256 = "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"; + }; + + buildInputs = [ pkgs.cmake ]; + + # no test data + doCheck = false; + + preConfigure = '' + mkdir build + cd build + cmake .. + cd ../py_ext + ''; + + meta = with stdenv.lib; { + description = "Trend Micro Locality Sensitive Hash"; + homepage = https://github.com/trendmicro/tlsh; + license = licenses.asl20; + platforms = platforms.linux; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ddb79119193..af1d8ed41622 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4349,30 +4349,7 @@ in { pythonefl = callPackage ../development/python-modules/python-efl { }; - tlsh = buildPythonPackage rec { - name = "tlsh-3.4.5"; - src = pkgs.fetchFromGitHub { - owner = "trendmicro"; - repo = "tlsh"; - rev = "22fa9a62068b92c63f2b5a87004a7a7ceaac1930"; - sha256 = "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"; - }; - buildInputs = with pkgs; [ cmake ]; - # no test data - doCheck = false; - preConfigure = '' - mkdir build - cd build - cmake .. - cd ../py_ext - ''; - meta = with stdenv.lib; { - description = "Trend Micro Locality Sensitive Hash"; - homepage = https://github.com/trendmicro/tlsh; - license = licenses.asl20; - platforms = platforms.linux; - }; - }; + tlsh = callPackage ../development/python-modules/tlsh { }; toposort = buildPythonPackage rec { name = "toposort-${version}";