diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dlib/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/dlib/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dlib/default.nix b/nixpkgs/pkgs/development/python-modules/dlib/default.nix new file mode 100644 index 000000000000..c200b6959b64 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dlib/default.nix @@ -0,0 +1,18 @@ +{ buildPythonPackage, dlib, python, pytest, avxSupport ? true }: + +buildPythonPackage { + inherit (dlib) name src nativeBuildInputs buildInputs meta; + + # although AVX can be enabled, we never test with it. Some Hydra machines + # fail because of this, however their build results are probably used on hardware + # with AVX support. + checkPhase = '' + ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS + ''; + + setupPyBuildFlags = [ "--${if avxSupport then "yes" else "no"} USE_AVX_INSTRUCTIONS" ]; + + patches = [ ./build-cores.patch ]; + + checkInputs = [ pytest ]; +} |