From 104af06196f35d2c92761def958148d8a60807c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 18 Jun 2024 11:26:10 +0000 Subject: [PATCH] dlib: Fix shared libraries not being built --- pkgs/development/libraries/dlib/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix index 9a9b774ad265..e7915ad65214 100644 --- a/pkgs/development/libraries/dlib/default.nix +++ b/pkgs/development/libraries/dlib/default.nix @@ -11,6 +11,7 @@ , config , guiSupport ? false , libX11 +, enableShared ? !stdenv.hostPlatform.isStatic # dlib has a build system that forces the user to choose between either shared or static libraries. See https://github.com/davisking/dlib/issues/923#issuecomment-2175865174 , sse4Support ? stdenv.hostPlatform.sse4_1Support , avxSupport ? stdenv.hostPlatform.avxSupport , cudaSupport ? config.cudaSupport @@ -32,6 +33,7 @@ ''; cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" enableShared) (lib.cmakeBool "USE_SSE4_INSTRUCTIONS" sse4Support) (lib.cmakeBool "USE_AVX_INSTRUCTIONS" avxSupport) (lib.cmakeBool "DLIB_USE_CUDA" cudaSupport)