2019-03-03 13:21:04 +00:00
|
|
|
{ buildPythonPackage, dlib, python, pytest, avxSupport ? true }:
|
2018-10-29 17:57:19 +00:00
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit (dlib) name src nativeBuildInputs buildInputs meta;
|
|
|
|
|
2019-03-03 13:21:04 +00:00
|
|
|
# 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.
|
2018-10-29 17:57:19 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
|
|
|
|
'';
|
|
|
|
|
2019-03-03 13:21:04 +00:00
|
|
|
setupPyBuildFlags = [ "--${if avxSupport then "yes" else "no"} USE_AVX_INSTRUCTIONS" ];
|
|
|
|
|
2018-10-29 17:57:19 +00:00
|
|
|
patches = [ ./build-cores.patch ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
}
|