···11{
22- stdenv,
32 buildPythonPackage,
43 dlib,
55- python,
64 pytestCheckHook,
75 more-itertools,
88- sse4Support ? stdenv.hostPlatform.sse4_1Support,
99- avxSupport ? stdenv.hostPlatform.avxSupport,
106}:
117128buildPythonPackage {
139 inherit (dlib)
1010+ stdenv
1411 pname
1512 version
1613 src
1714 nativeBuildInputs
1815 buildInputs
1616+ cmakeFlags
1717+ passthru
1918 meta
2019 ;
2120···3433 --replace "pytest==3.8" "pytest"
3534 '';
36353737- setupPyBuildFlags = [
3838- "--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
3939- "--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}"
4040- ];
3636+ # Pass CMake flags through to the build script
3737+ preConfigure = ''
3838+ for flag in $cmakeFlags; do
3939+ if [[ "$flag" == -D* ]]; then
4040+ setupPyBuildFlags+=" --set ''${flag#-D}"
4141+ fi
4242+ done
4343+ '';
41444245 dontUseCmakeConfigure = true;
4646+4747+ doCheck =
4848+ !(
4949+ # The tests attempt to use CUDA on the build platform.
5050+ # https://github.com/NixOS/nixpkgs/issues/225912
5151+ dlib.cudaSupport
5252+5353+ # although AVX can be enabled, we never test with it. Some Hydra machines
5454+ # fail because of this, however their build results are probably used on hardware
5555+ # with AVX support.
5656+ || dlib.avxSupport
5757+ );
4358}
···298298 dart_stable = throw "'dart_stable' has been renamed to/replaced by 'dart'"; # Converted to throw 2024-10-17
299299 dart-sass-embedded = throw "dart-sass-embedded has been removed from nixpkgs, as is now included in Dart Sass itself.";
300300 dat = nodePackages.dat;
301301+ dave = throw "'dave' has been removed as it has been archived upstream. Consider using 'webdav' instead"; # Added 2025-02-03
301302 dbeaver = throw "'dbeaver' has been renamed to/replaced by 'dbeaver-bin'"; # Added 2024-05-16
302303 dbus-map = throw "'dbus-map' has been dropped as it is unmaintained"; # Added 2024-11-01
303304 deadpixi-sam = deadpixi-sam-unstable;