1 { stdenv, buildPythonPackage, dlib, python, pytest, more-itertools
2 , sse4Support ? stdenv.hostPlatform.sse4_1Support
3 , avxSupport ? stdenv.hostPlatform.avxSupport
7 inherit (dlib) pname version src nativeBuildInputs buildInputs meta;
15 nativeCheckInputs = [ pytest more-itertools ];
18 substituteInPlace setup.py \
19 --replace "more-itertools<6.0.0" "more-itertools" \
20 --replace "pytest==3.8" "pytest"
23 # although AVX can be enabled, we never test with it. Some Hydra machines
24 # fail because of this, however their build results are probably used on hardware
27 ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
31 "--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
32 "--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}"
35 dontUseCmakeConfigure = true;