diff --git a/pkgs/applications/science/misc/openmvg/default.nix b/pkgs/applications/science/misc/openmvg/default.nix index 746dda16d9bf..9bd4cf12db03 100644 --- a/pkgs/applications/science/misc/openmvg/default.nix +++ b/pkgs/applications/science/misc/openmvg/default.nix @@ -4,6 +4,7 @@ , libpng ? null , eigen ? null , libtiff ? null +, enableShared ? !stdenv.hostPlatform.isStatic , enableExamples ? false , enableDocs ? false }: @@ -27,8 +28,7 @@ stdenv.mkDerivation rec { "-DCMAKE_CXX_FLAGS=-std=c++11" "-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}" "-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}" - "-DOpenMVG_BUILD_SHARED=ON" - ]; + ] ++ lib.optional enableShared "-DOpenMVG_BUILD_SHARED=ON"; cmakeDir = "./src";