Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 29 lines 863 B view raw
1{ buildPythonPackage, stdenv, lib, dlib, python, pytest, more-itertools 2, avxSupport ? stdenv.hostPlatform.avxSupport 3}: 4 5buildPythonPackage { 6 inherit (dlib) name src nativeBuildInputs buildInputs meta; 7 8 # although AVX can be enabled, we never test with it. Some Hydra machines 9 # fail because of this, however their build results are probably used on hardware 10 # with AVX support. 11 checkPhase = '' 12 ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS 13 ''; 14 15 setupPyBuildFlags = lib.optional avxSupport "--no USE_AVX_INSTRUCTIONS"; 16 17 patches = [ ./build-cores.patch ]; 18 19 postPatch = '' 20 substituteInPlace setup.py \ 21 --replace "more-itertools<6.0.0" "more-itertools" \ 22 --replace "pytest==3.8" "pytest" 23 ''; 24 25 checkInputs = [ pytest more-itertools ]; 26 27 enableParallelBuilding = true; 28 dontUseCmakeConfigure = true; 29}