diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-03-03 14:21:04 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-03-03 15:35:58 +0100 |
commit | 9732c44225910d5726ff95a7ab8c9a4684dfec4d (patch) | |
tree | 45db82d442400acf5ad543b4ed5e1bd6f8e72a9b /pkgs/development/python-modules/dlib | |
parent | 77edcf88dca0de15a2bcf34f8d94f02d1fbd4eab (diff) | |
download | nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar.gz nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar.bz2 nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar.lz nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar.xz nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.tar.zst nixlib-9732c44225910d5726ff95a7ab8c9a4684dfec4d.zip |
dlib: add flag to disable AVX support
Especially older hardware doesn't support AVX instructions. DLib is still functional there, but significantly slower[1]. By setting `avxInstructions` to false, DLib will be compiled without this feature. [1] http://dlib.net/compile.html
Diffstat (limited to 'pkgs/development/python-modules/dlib')
-rw-r--r-- | pkgs/development/python-modules/dlib/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/dlib/default.nix b/pkgs/development/python-modules/dlib/default.nix index 90e2c526789f..c200b6959b64 100644 --- a/pkgs/development/python-modules/dlib/default.nix +++ b/pkgs/development/python-modules/dlib/default.nix @@ -1,12 +1,17 @@ -{ buildPythonPackage, dlib, python, pytest }: +{ 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 ]; |