Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 43 lines 808 B view raw
1{ 2 stdenv, 3 buildPythonPackage, 4 dlib, 5 python, 6 pytestCheckHook, 7 more-itertools, 8 sse4Support ? stdenv.hostPlatform.sse4_1Support, 9 avxSupport ? stdenv.hostPlatform.avxSupport, 10}: 11 12buildPythonPackage { 13 inherit (dlib) 14 pname 15 version 16 src 17 nativeBuildInputs 18 buildInputs 19 meta 20 ; 21 22 format = "setuptools"; 23 24 patches = [ ./build-cores.patch ]; 25 26 nativeCheckInputs = [ 27 pytestCheckHook 28 more-itertools 29 ]; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace "more-itertools<6.0.0" "more-itertools" \ 34 --replace "pytest==3.8" "pytest" 35 ''; 36 37 setupPyBuildFlags = [ 38 "--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}" 39 "--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" 40 ]; 41 42 dontUseCmakeConfigure = true; 43}