From b7bc6e7f6ca33775643553fe046e804425c8ce5d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 29 Oct 2018 18:57:19 +0100 Subject: pythonPackages.dlib: move expression Initially the expression was quite small (just inherited properties from `pkgs.dlib`), but the more it grows the better it is to store it into its own file. --- pkgs/development/python-modules/dlib/default.nix | 13 +++++++++++++ pkgs/top-level/python-packages.nix | 12 ++---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 pkgs/development/python-modules/dlib/default.nix (limited to 'pkgs') diff --git a/pkgs/development/python-modules/dlib/default.nix b/pkgs/development/python-modules/dlib/default.nix new file mode 100644 index 000000000000..90e2c526789f --- /dev/null +++ b/pkgs/development/python-modules/dlib/default.nix @@ -0,0 +1,13 @@ +{ buildPythonPackage, dlib, python, pytest }: + +buildPythonPackage { + inherit (dlib) name src nativeBuildInputs buildInputs meta; + + checkPhase = '' + ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS + ''; + + patches = [ ./build-cores.patch ]; + + checkInputs = [ pytest ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 164e7504e8bf..5e3a3cc21ef9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -961,16 +961,8 @@ in { cypari2 = callPackage ../development/python-modules/cypari2 { }; - dlib = buildPythonPackage rec { - inherit (pkgs.dlib) name src nativeBuildInputs meta buildInputs; - - checkPhase = '' - ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS - ''; - - patches = [ ../development/python-modules/dlib/build-cores.patch ]; - - checkInputs = with self; [ pytest ]; + dlib = callPackage ../development/python-modules/dlib { + inherit (pkgs) dlib; }; datadog = callPackage ../development/python-modules/datadog {}; -- cgit 1.4.1