about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dlib/default.nix
blob: c200b6959b6473c7882cb2402c7631ee4936462c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ buildPythonPackage, dlib, python, pytest, avxSupport ? true }:

buildPythonPackage {
  inherit (dlib) name src nativeBuildInputs buildInputs meta;

  # 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.
  checkPhase = ''
    ${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
  '';

  setupPyBuildFlags = [ "--${if avxSupport then "yes" else "no"} USE_AVX_INSTRUCTIONS" ];

  patches = [ ./build-cores.patch ];

  checkInputs = [ pytest ];
}