dlib: 19.16 -> 19.17

https://github.com/davisking/dlib/releases/tag/v19.17

Also had to change the expression for setup.py flags as 19.17 doesn't
support `--yes` anymore.
This commit is contained in:
Maximilian Bosch 2019-08-22 19:53:49 +02:00
parent 3d91781151
commit 311516f55e
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
2 changed files with 11 additions and 5 deletions

@ -6,14 +6,14 @@
}:
stdenv.mkDerivation rec {
version = "19.16";
version = "19.17";
name = "dlib-${version}";
src = fetchFromGitHub {
owner = "davisking";
repo = "dlib";
rev ="v${version}";
sha256 = "0ix52npsxfm6324jli7y0zkyijl5yirv2yzfncyd4sq0r9fcwb4p";
sha256 = "0g11ilma6cll3bd2ahm66j1sjb9v4rxz3xjbfkcg5pjsvb49n029";
};
postPatch = ''

@ -1,4 +1,4 @@
{ buildPythonPackage, dlib, python, pytest, avxSupport ? true }:
{ buildPythonPackage, dlib, python, pytest, more-itertools, avxSupport ? true, lib }:
buildPythonPackage {
inherit (dlib) name src nativeBuildInputs buildInputs meta;
@ -10,9 +10,15 @@ buildPythonPackage {
${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
'';
setupPyBuildFlags = [ "--${if avxSupport then "yes" else "no"} USE_AVX_INSTRUCTIONS" ];
setupPyBuildFlags = lib.optional avxSupport "--no USE_AVX_INSTRUCTIONS";
patches = [ ./build-cores.patch ];
checkInputs = [ pytest ];
postPatch = ''
substituteInPlace setup.py \
--replace "more-itertools<6.0.0" "more-itertools" \
--replace "pytest==3.8" "pytest"
'';
checkInputs = [ pytest more-itertools ];
}