about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2023-10-17 00:23:02 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2023-10-17 00:23:02 +0200
commit04fab8b9eed529430d362131deaa2c2d9f82dc1b (patch)
tree607b70441250d87ff9cab8ee3348e811bb3170ad
parent1471dfec60a1113ed2c2f08df96c322e876c288b (diff)
dlib: build with fftw, blas and webp
-rw-r--r--pkgs/development/libraries/dlib/default.nix30
1 files changed, 24 insertions, 6 deletions
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
index 431f010eed1dd..3eaa1a1709248 100644
--- a/pkgs/development/libraries/dlib/default.nix
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -1,5 +1,15 @@
-{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libpng, libjpeg
-, guiSupport ? false, libX11
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, fftw
+, libpng
+, libjpeg
+, libwebp
+, openblas
+, guiSupport ? false
+, libX11
 
   # see http://dlib.net/compile.html
 , sse4Support ? stdenv.hostPlatform.sse4_1Support
@@ -23,12 +33,20 @@ stdenv.mkDerivation rec {
   '';
 
   cmakeFlags = [
-    "-DUSE_DLIB_USE_CUDA=${if cudaSupport then "1" else "0"}"
-    "-DUSE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
-    "-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
+    (lib.cmakeBool "USE_DLIB_USE_CUDA" cudaSupport)
+    (lib.cmakeBool "USE_SSE4_INSTRUCTIONS" sse4Support)
+    (lib.cmakeBool "USE_AVX_INSTRUCTIONS" avxSupport)
+  ];
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ libpng libjpeg ] ++ lib.optional guiSupport libX11;
+
+  buildInputs = [
+    fftw
+    libpng
+    libjpeg
+    libwebp
+    openblas
+  ] ++ lib.optional guiSupport libX11;
 
   meta = with lib; {
     description = "A general purpose cross-platform C++ machine learning library";