about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dlib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dlib/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/dlib/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dlib/default.nix b/nixpkgs/pkgs/development/python-modules/dlib/default.nix
index 204c1a985425..58ceb16870a8 100644
--- a/nixpkgs/pkgs/development/python-modules/dlib/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/dlib/default.nix
@@ -1,4 +1,5 @@
 { buildPythonPackage, stdenv, lib, dlib, python, pytest, more-itertools
+, sse4Support ? stdenv.hostPlatform.sse4_1Support
 , avxSupport ? stdenv.hostPlatform.avxSupport
 }:
 
@@ -12,7 +13,10 @@ buildPythonPackage {
     ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
   '';
 
-  setupPyBuildFlags = lib.optional avxSupport "--no USE_AVX_INSTRUCTIONS";
+  setupPyBuildFlags = [
+    "--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
+    "--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}"
+  ];
 
   patches = [ ./build-cores.patch ];