diff --git a/pkgs/applications/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix index d2ccb6d47472..b277175ec102 100644 --- a/pkgs/applications/audio/giada/default.nix +++ b/pkgs/applications/audio/giada/default.nix @@ -41,7 +41,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_INSTALL_BINDIR=bin" - "-DCMAKE_BUILD_TYPE=Release" ]; nativeBuildInputs = [ diff --git a/pkgs/applications/audio/sfizz/default.nix b/pkgs/applications/audio/sfizz/default.nix index 05957bf38f2b..4f203a77dc86 100644 --- a/pkgs/applications/audio/sfizz/default.nix +++ b/pkgs/applications/audio/sfizz/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { --replace '/usr/bin/zenity' '${gnome.zenity}/bin/zenity' ''; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DSFIZZ_TESTS=ON" ]; + cmakeFlags = [ "-DSFIZZ_TESTS=ON" ]; doCheck = true; diff --git a/pkgs/applications/audio/spotify-qt/default.nix b/pkgs/applications/audio/spotify-qt/default.nix index 65a921ed5bf2..d302643eb47d 100644 --- a/pkgs/applications/audio/spotify-qt/default.nix +++ b/pkgs/applications/audio/spotify-qt/default.nix @@ -22,7 +22,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=" ]; + cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=" ]; installFlags = [ "DESTDIR=$(out)" ]; diff --git a/pkgs/applications/blockchains/aeon/default.nix b/pkgs/applications/blockchains/aeon/default.nix index 13928c856b99..7928a63b8264 100644 --- a/pkgs/applications/blockchains/aeon/default.nix +++ b/pkgs/applications/blockchains/aeon/default.nix @@ -26,7 +26,6 @@ stdenv.mkDerivation { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" ]; diff --git a/pkgs/applications/blockchains/haven-cli/default.nix b/pkgs/applications/blockchains/haven-cli/default.nix index 2bc3a683ef50..066bbde363ac 100644 --- a/pkgs/applications/blockchains/haven-cli/default.nix +++ b/pkgs/applications/blockchains/haven-cli/default.nix @@ -45,7 +45,6 @@ stdenv.mkDerivation rec { ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DUSE_DEVICE_TREZOR=ON" "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 8322a67dd5a1..2f508897821c 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -58,7 +58,6 @@ stdenv.mkDerivation rec { ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DUSE_DEVICE_TREZOR=ON" "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" diff --git a/pkgs/applications/blockchains/oxen/default.nix b/pkgs/applications/blockchains/oxen/default.nix index a8948d7df5a1..0136bc910da9 100644 --- a/pkgs/applications/blockchains/oxen/default.nix +++ b/pkgs/applications/blockchains/oxen/default.nix @@ -47,7 +47,6 @@ stdenv.mkDerivation rec { ] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" # "-DUSE_DEVICE_TREZOR=ON" # "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index e854291310b8..a619c636cd53 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -115,7 +115,6 @@ in cmakeFlags = [ "-DRSTUDIO_TARGET=${if server then "Server" else "Desktop"}" - "-DCMAKE_BUILD_TYPE=Release" "-DRSTUDIO_USE_SYSTEM_SOCI=ON" "-DRSTUDIO_USE_SYSTEM_BOOST=ON" "-DRSTUDIO_USE_SYSTEM_YAML_CPP=ON" diff --git a/pkgs/applications/emulators/vbam/default.nix b/pkgs/applications/emulators/vbam/default.nix index 2b252f0f10de..32f3c98fd0ef 100644 --- a/pkgs/applications/emulators/vbam/default.nix +++ b/pkgs/applications/emulators/vbam/default.nix @@ -44,7 +44,6 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE='Release'" "-DENABLE_FFMPEG='true'" "-DENABLE_LINK='true'" "-DSYSCONFDIR=etc" diff --git a/pkgs/applications/graphics/brlcad/default.nix b/pkgs/applications/graphics/brlcad/default.nix index 2a0853fb2212..f30a6acbbbee 100644 --- a/pkgs/applications/graphics/brlcad/default.nix +++ b/pkgs/applications/graphics/brlcad/default.nix @@ -34,7 +34,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBRLCAD_ENABLE_STRICT=OFF" - "-DCMAKE_BUILD_TYPE=Release" ]; meta = with lib; { diff --git a/pkgs/applications/graphics/krita/generic.nix b/pkgs/applications/graphics/krita/generic.nix index 4f16661cedb1..4a946ef8c159 100644 --- a/pkgs/applications/graphics/krita/generic.nix +++ b/pkgs/applications/graphics/krita/generic.nix @@ -47,10 +47,11 @@ mkDerivation rec { --replace 'PYTHONPATH=''${_krita_python_path}' 'PYTHONPATH=${pythonPath}' ''; + cmakeBuildType = "RelWithDebInfo"; + cmakeFlags = [ "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" "-DPYQT_SIP_DIR_OVERRIDE=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" ]; preInstall = '' diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix index c50a0ebb7490..14c86082e671 100644 --- a/pkgs/applications/graphics/paraview/default.nix +++ b/pkgs/applications/graphics/paraview/default.nix @@ -45,7 +45,6 @@ in stdenv.mkDerivation rec { ''; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DPARAVIEW_ENABLE_FFMPEG=ON" "-DPARAVIEW_ENABLE_GDAL=ON" "-DPARAVIEW_ENABLE_MOTIONFX=ON" diff --git a/pkgs/applications/misc/huggle/default.nix b/pkgs/applications/misc/huggle/default.nix index a136f1f678ae..3a6f25ede695 100644 --- a/pkgs/applications/misc/huggle/default.nix +++ b/pkgs/applications/misc/huggle/default.nix @@ -40,9 +40,10 @@ stdenv.mkDerivation rec { substituteInPlace src/CMakeLists.txt --replace '@libirc_includes@' '${libirc.out}' ''; + cmakeBuildType = "None"; + cmakeFlags = [ "-S" "/build/source/src" - "-DCMAKE_BUILD_TYPE=None" "-DINSTALL_DATA_DIR=bin" "-DQT5_BUILD=ON" "-DWEB_ENGINE=ON" diff --git a/pkgs/applications/misc/keyleds/default.nix b/pkgs/applications/misc/keyleds/default.nix index c48b30b34dc9..a759b8e393e9 100644 --- a/pkgs/applications/misc/keyleds/default.nix +++ b/pkgs/applications/misc/keyleds/default.nix @@ -52,9 +52,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=MinSizeRel" - ]; + cmakeBuildType = "MinSizeRel"; meta = { homepage = "https://github.com/keyleds/keyleds"; diff --git a/pkgs/applications/misc/opentrack/default.nix b/pkgs/applications/misc/opentrack/default.nix index b4c455c0ce04..84edbc567b41 100644 --- a/pkgs/applications/misc/opentrack/default.nix +++ b/pkgs/applications/misc/opentrack/default.nix @@ -46,7 +46,6 @@ in dontWrapQtApps = true; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=RELEASE" "-DSDK_ARUCO_LIBPATH=${aruco}/lib/libaruco.a" "-DSDK_XPLANE=${xplaneSdk}" ]; diff --git a/pkgs/applications/networking/qv2ray/default.nix b/pkgs/applications/networking/qv2ray/default.nix index bb9bb957f3d3..038d904f453b 100644 --- a/pkgs/applications/networking/qv2ray/default.nix +++ b/pkgs/applications/networking/qv2ray/default.nix @@ -42,7 +42,6 @@ mkDerivation rec { }; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DQV2RAY_DISABLE_AUTO_UPDATE=on" "-DQV2RAY_USE_V5_CORE=on" "-DQV2RAY_TRANSLATION_PATH=${placeholder "out"}/share/qv2ray/lang" diff --git a/pkgs/applications/radio/soapysdr/default.nix b/pkgs/applications/radio/soapysdr/default.nix index e11e2af401b9..201a5055e601 100644 --- a/pkgs/applications/radio/soapysdr/default.nix +++ b/pkgs/applications/radio/soapysdr/default.nix @@ -38,9 +38,7 @@ in stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = lib.optional usePython python.pkgs.numpy; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" - ] ++ lib.optional usePython "-DUSE_PYTHON_CONFIG=ON"; + cmakeFlags = lib.optional usePython "-DUSE_PYTHON_CONFIG=ON"; # https://github.com/pothosware/SoapySDR/issues/352 postPatch = '' diff --git a/pkgs/applications/science/biology/sortmerna/default.nix b/pkgs/applications/science/biology/sortmerna/default.nix index 6884e1955f75..a529867aaa74 100644 --- a/pkgs/applications/science/biology/sortmerna/default.nix +++ b/pkgs/applications/science/biology/sortmerna/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { buildInputs = [ zlib rocksdb rapidjson ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DPORTABLE=off" "-DRAPIDJSON_HOME=${rapidjson}" "-DROCKSDB_HOME=${rocksdb}" diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix index fa9b77037038..3403e410cf85 100644 --- a/pkgs/applications/science/electronics/kicad/base.nix +++ b/pkgs/applications/science/electronics/kicad/base.nix @@ -104,7 +104,6 @@ stdenv.mkDerivation rec { "-DKICAD_BUILD_QA_TESTS=OFF" ] ++ optionals (debug) [ - "-DCMAKE_BUILD_TYPE=Debug" "-DKICAD_STDLIB_DEBUG=ON" "-DKICAD_USE_VALGRIND=ON" ] @@ -115,6 +114,8 @@ stdenv.mkDerivation rec { "-DKICAD_SANITIZE_THREADS=ON" ]; + cmakeBuildType = if debug then "Debug" else "Release"; + nativeBuildInputs = [ cmake doxygen diff --git a/pkgs/applications/science/electronics/openboardview/default.nix b/pkgs/applications/science/electronics/openboardview/default.nix index 715a99cf4897..a750001d05db 100644 --- a/pkgs/applications/science/electronics/openboardview/default.nix +++ b/pkgs/applications/science/electronics/openboardview/default.nix @@ -39,7 +39,6 @@ stdenv.mkDerivation rec { ''; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DGLAD_REPRODUCIBLE=On" ]; diff --git a/pkgs/applications/science/logic/cvc4/default.nix b/pkgs/applications/science/logic/cvc4/default.nix index e9f04d2044dc..1513c7477985 100644 --- a/pkgs/applications/science/logic/cvc4/default.nix +++ b/pkgs/applications/science/logic/cvc4/default.nix @@ -35,9 +35,8 @@ stdenv.mkDerivation rec { preConfigure = '' patchShebangs ./src/ ''; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Production" - ]; + + cmakeBuildType = "Production"; meta = with lib; { description = "A high-performance theorem prover and SMT solver"; diff --git a/pkgs/applications/science/logic/cvc5/default.nix b/pkgs/applications/science/logic/cvc5/default.nix index 24bcb16df9d9..9a540f5b5507 100644 --- a/pkgs/applications/science/logic/cvc5/default.nix +++ b/pkgs/applications/science/logic/cvc5/default.nix @@ -21,8 +21,9 @@ stdenv.mkDerivation rec { patchShebangs ./src/ ''; + cmakeBuildType = "Production"; + cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Production" "-DBUILD_SHARED_LIBS=1" "-DANTLR3_JAR=${antlr3_4}/lib/antlr/antlr-3.4-complete.jar" ]; diff --git a/pkgs/applications/science/logic/klee/default.nix b/pkgs/applications/science/logic/klee/default.nix index 401b2f48a6ea..68f68355f816 100644 --- a/pkgs/applications/science/logic/klee/default.nix +++ b/pkgs/applications/science/logic/klee/default.nix @@ -72,10 +72,11 @@ in stdenv.mkDerivation rec { (lit.override { python = kleePython; }) ]; + cmakeBuildType = if debug then "Debug" else if !debug && includeDebugInfo then "RelWithDebInfo" else "MinSizeRel"; + cmakeFlags = let onOff = val: if val then "ON" else "OFF"; in [ - "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else if !debug && includeDebugInfo then "RelWithDebInfo" else "MinSizeRel"}" "-DKLEE_RUNTIME_BUILD_TYPE=${if debugRuntime then "Debug" else "Release"}" "-DLLVMCC=${clang}/bin/clang" "-DLLVMCXX=${clang}/bin/clang++" diff --git a/pkgs/applications/video/hyperion-ng/default.nix b/pkgs/applications/video/hyperion-ng/default.nix index a1eb4086e89c..43bd337ae500 100644 --- a/pkgs/applications/video/hyperion-ng/default.nix +++ b/pkgs/applications/video/hyperion-ng/default.nix @@ -49,7 +49,6 @@ stdenv.mkDerivation rec { '' ; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DENABLE_DEPLOY_DEPENDENCIES=OFF" "-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON" "-DUSE_SYSTEM_PROTO_LIBS=ON" diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix index 5c26d20eda98..47afaef81a63 100644 --- a/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/pkgs/applications/video/jellyfin-media-player/default.nix @@ -72,7 +72,6 @@ mkDerivation rec { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DQTROOT=${qtbase}" "-GNinja" ] ++ lib.optionals (!withDbus) [ diff --git a/pkgs/applications/video/plex-media-player/default.nix b/pkgs/applications/video/plex-media-player/default.nix index 34b6eb9c2862..6a686d9d2c2a 100644 --- a/pkgs/applications/video/plex-media-player/default.nix +++ b/pkgs/applications/video/plex-media-player/default.nix @@ -34,7 +34,9 @@ in mkDerivation rec { ln -s ${webClientTv} build/dependencies/web-client-tv-${webClientTvBuildId}.tar.xz ''; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DQTROOT=${qtbase}" ]; + cmakeBuildType = "RelWithDebInfo"; + + cmakeFlags = [ "-DQTROOT=${qtbase}" ]; # plexmediaplayer currently segfaults under wayland qtWrapperArgs = [ "--set" "QT_QPA_PLATFORM" "xcb" ]; diff --git a/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix b/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix index 73db7f0353fc..17f53883424c 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-k+rG5AZjz47Q6bpVcTK7r4s7Avg3O+1iw+skK+cn0rk="; }; - cmakeFlags = lib.optional debug "-DCMAKE_BUILD_TYPE=Debug"; + cmakeBuildType = if debug then "Debug" else "Release"; nativeBuildInputs = [ cmake diff --git a/pkgs/data/themes/kwin-decorations/sierra-breeze-enhanced/default.nix b/pkgs/data/themes/kwin-decorations/sierra-breeze-enhanced/default.nix index 6e9db943c91c..46d6af5f24c4 100644 --- a/pkgs/data/themes/kwin-decorations/sierra-breeze-enhanced/default.nix +++ b/pkgs/data/themes/kwin-decorations/sierra-breeze-enhanced/default.nix @@ -23,7 +23,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" - "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_TESTING=OFF" "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON" ]; diff --git a/pkgs/development/compilers/ldc/generic.nix b/pkgs/development/compilers/ldc/generic.nix index f88f4484cfd1..130dcecf1201 100644 --- a/pkgs/development/compilers/ldc/generic.nix +++ b/pkgs/development/compilers/ldc/generic.nix @@ -68,7 +68,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}" - "-DCMAKE_BUILD_TYPE=Release" ]; postConfigure = '' diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix index 6f8ef0b57512..c4e6f2827e82 100644 --- a/pkgs/development/compilers/llvm/10/llvm/default.nix +++ b/pkgs/development/compilers/llvm/10/llvm/default.nix @@ -204,6 +204,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -219,7 +221,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix index a5078ef3b76d..01e6483ad640 100644 --- a/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -212,6 +212,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -227,7 +229,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix index 3c724e07bd16..97d8f27672e3 100644 --- a/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -202,6 +202,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -217,7 +219,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index 827e528581cf..2a7c1c1867cb 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -164,6 +164,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -179,7 +181,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix index 06b549983527..081c84c04e06 100644 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -162,6 +162,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -177,7 +179,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/15/llvm/default.nix b/pkgs/development/compilers/llvm/15/llvm/default.nix index 7742fc0a186c..e6f339ff6d6d 100644 --- a/pkgs/development/compilers/llvm/15/llvm/default.nix +++ b/pkgs/development/compilers/llvm/15/llvm/default.nix @@ -298,6 +298,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -313,7 +315,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/16/llvm/default.nix b/pkgs/development/compilers/llvm/16/llvm/default.nix index 8e676f5ad46d..c70f9d37a562 100644 --- a/pkgs/development/compilers/llvm/16/llvm/default.nix +++ b/pkgs/development/compilers/llvm/16/llvm/default.nix @@ -286,6 +286,8 @@ in # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -301,7 +303,6 @@ in "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/5/llvm/default.nix b/pkgs/development/compilers/llvm/5/llvm/default.nix index 219ae190e955..74523490244f 100644 --- a/pkgs/development/compilers/llvm/5/llvm/default.nix +++ b/pkgs/development/compilers/llvm/5/llvm/default.nix @@ -141,6 +141,8 @@ stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -156,7 +158,6 @@ stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/6/llvm/default.nix b/pkgs/development/compilers/llvm/6/llvm/default.nix index 1c75660c20f5..72e43ba8d1fa 100644 --- a/pkgs/development/compilers/llvm/6/llvm/default.nix +++ b/pkgs/development/compilers/llvm/6/llvm/default.nix @@ -161,6 +161,8 @@ stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -176,7 +178,6 @@ stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/7/llvm/default.nix b/pkgs/development/compilers/llvm/7/llvm/default.nix index 7bfaef7d00b0..97ac428a7f55 100644 --- a/pkgs/development/compilers/llvm/7/llvm/default.nix +++ b/pkgs/development/compilers/llvm/7/llvm/default.nix @@ -179,6 +179,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -194,7 +196,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/8/llvm/default.nix b/pkgs/development/compilers/llvm/8/llvm/default.nix index f95cefb9addd..8a0fea85e260 100644 --- a/pkgs/development/compilers/llvm/8/llvm/default.nix +++ b/pkgs/development/compilers/llvm/8/llvm/default.nix @@ -178,6 +178,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -193,7 +195,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix index b7259ac19150..526030d6b34d 100644 --- a/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -193,6 +193,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -208,7 +210,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix index 634cd7829533..66b0a7438cef 100644 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -283,6 +283,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + cmakeBuildType = if debugVersion then "Debug" else "Release"; + cmakeFlags = with stdenv; let # These flags influence llvm-config's BuildVariables.inc in addition to the # general build. We need to make sure these are also passed via @@ -298,7 +300,6 @@ in stdenv.mkDerivation (rec { "-DLLVM_LINK_LLVM_DYLIB=ON" ]; in flagsForLlvmConfig ++ [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" diff --git a/pkgs/development/libraries/flatcc/default.nix b/pkgs/development/libraries/flatcc/default.nix index a65ad5c6fe37..1f487955b3f3 100644 --- a/pkgs/development/libraries/flatcc/default.nix +++ b/pkgs/development/libraries/flatcc/default.nix @@ -18,7 +18,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DFLATCC_INSTALL=on" - "-DCMAKE_BUILD_TYPE=Release" ]; env.NIX_CFLAGS_COMPILE = toString [ diff --git a/pkgs/development/libraries/libyang/default.nix b/pkgs/development/libraries/libyang/default.nix index 9102286746b6..88fdfcca03ca 100644 --- a/pkgs/development/libraries/libyang/default.nix +++ b/pkgs/development/libraries/libyang/default.nix @@ -36,7 +36,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_INCLUDEDIR=include" - "-DCMAKE_BUILD_TYPE:String=Release" ]; passthru.updateScript = gitUpdater { diff --git a/pkgs/development/libraries/muparserx/default.nix b/pkgs/development/libraries/muparserx/default.nix index 2b3d2853d132..8a7d2c8f3646 100644 --- a/pkgs/development/libraries/muparserx/default.nix +++ b/pkgs/development/libraries/muparserx/default.nix @@ -16,10 +16,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" - ]; - doCheck = true; checkPhase = '' echo "***Muparserx self-test***" diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index 1b955b57de42..4a9ee61f5614 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -133,7 +133,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DABSL_ENABLE_INSTALL=ON" - "-DCMAKE_BUILD_TYPE=RELEASE" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DFETCHCONTENT_QUIET=OFF" "-DFETCHCONTENT_SOURCE_DIR_ABSEIL_CPP=${abseil-cpp.src}" diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix index fc0afbe2184c..a94234aec41b 100644 --- a/pkgs/development/libraries/phonon/backends/gstreamer.nix +++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix @@ -58,9 +58,7 @@ stdenv.mkDerivation rec { qttools ]; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" - ]; + cmakeBuildType = if debug then "Debug" else "Release"; meta = with lib; { homepage = "https://phonon.kde.org/"; diff --git a/pkgs/development/libraries/phonon/backends/vlc.nix b/pkgs/development/libraries/phonon/backends/vlc.nix index 42923d4f026b..a50a07dde1a1 100644 --- a/pkgs/development/libraries/phonon/backends/vlc.nix +++ b/pkgs/development/libraries/phonon/backends/vlc.nix @@ -28,9 +28,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" - ]; + cmakeBuildType = if debug then "Debug" else "Release"; meta = with lib; { homepage = "https://community.kde.org/Phonon"; diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix index 59d9e19556aa..dc95b4ed8266 100644 --- a/pkgs/development/libraries/phonon/default.nix +++ b/pkgs/development/libraries/phonon/default.nix @@ -52,9 +52,7 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-fPIC"; - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" - ]; + cmakeBuildType = if debug then "Debug" else "Release"; dontWrapQtApps = true; diff --git a/pkgs/development/libraries/reproc/default.nix b/pkgs/development/libraries/reproc/default.nix index 2083a6a7af4d..680455d4cb5a 100644 --- a/pkgs/development/libraries/reproc/default.nix +++ b/pkgs/development/libraries/reproc/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_SHARED_LIBS=ON" "-DREPROC++=ON" diff --git a/pkgs/development/libraries/rnnoise-plugin/default.nix b/pkgs/development/libraries/rnnoise-plugin/default.nix index d5f5268ac8eb..39a8f1a4b6a6 100644 --- a/pkgs/development/libraries/rnnoise-plugin/default.nix +++ b/pkgs/development/libraries/rnnoise-plugin/default.nix @@ -49,8 +49,6 @@ stdenv.mkDerivation rec { simd ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - meta = with lib; { description = "A real-time noise suppression plugin for voice based on Xiph's RNNoise"; homepage = "https://github.com/werman/noise-suppression-for-voice"; diff --git a/pkgs/development/libraries/sentry-native/default.nix b/pkgs/development/libraries/sentry-native/default.nix index 9f6ac99c6f02..09989fb7bddf 100644 --- a/pkgs/development/libraries/sentry-native/default.nix +++ b/pkgs/development/libraries/sentry-native/default.nix @@ -28,8 +28,9 @@ stdenv.mkDerivation rec { breakpad ]; + cmakeBuildType = "RelWithDebInfo"; + cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DSENTRY_BREAKPAD_SYSTEM=On" ]; diff --git a/pkgs/development/python-modules/gudhi/default.nix b/pkgs/development/python-modules/gudhi/default.nix index 6fbba605da99..1e0932e62867 100644 --- a/pkgs/development/python-modules/gudhi/default.nix +++ b/pkgs/development/python-modules/gudhi/default.nix @@ -38,7 +38,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DWITH_GUDHI_PYTHON=ON" "-DPython_ADDITIONAL_VERSIONS=3" ]; diff --git a/pkgs/development/tools/wasmedge/default.nix b/pkgs/development/tools/wasmedge/default.nix index 741a610c8907..6ebbe75a15bb 100644 --- a/pkgs/development/tools/wasmedge/default.nix +++ b/pkgs/development/tools/wasmedge/default.nix @@ -41,7 +41,6 @@ stdenv.mkDerivation (finalAttrs: { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DWASMEDGE_BUILD_TESTS=OFF" # Tests are downloaded using git ] ++ lib.optionals stdenv.isDarwin [ "-DWASMEDGE_FORCE_DISABLE_LTO=ON" diff --git a/pkgs/games/etlegacy/default.nix b/pkgs/games/etlegacy/default.nix index ee5d31874c68..befbbc5ed291 100644 --- a/pkgs/games/etlegacy/default.nix +++ b/pkgs/games/etlegacy/default.nix @@ -100,7 +100,6 @@ stdenv.mkDerivation { ''; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DCROSS_COMPILE32=0" "-DBUILD_SERVER=1" "-DBUILD_CLIENT=1" diff --git a/pkgs/games/lzwolf/default.nix b/pkgs/games/lzwolf/default.nix index 7598022f31b1..37bcc7fc8e06 100644 --- a/pkgs/games/lzwolf/default.nix +++ b/pkgs/games/lzwolf/default.nix @@ -38,7 +38,6 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DGPL=ON" ]; diff --git a/pkgs/games/nanosaur/default.nix b/pkgs/games/nanosaur/default.nix index 5460d3d87e02..4ec59b726ee3 100644 --- a/pkgs/games/nanosaur/default.nix +++ b/pkgs/games/nanosaur/default.nix @@ -20,8 +20,6 @@ stdenv.mkDerivation rec { SDL2 ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - installPhase = '' runHook preInstall mkdir -p "$out/bin" diff --git a/pkgs/games/nanosaur2/default.nix b/pkgs/games/nanosaur2/default.nix index 423d40e71c6c..7ab77623e653 100644 --- a/pkgs/games/nanosaur2/default.nix +++ b/pkgs/games/nanosaur2/default.nix @@ -20,8 +20,6 @@ stdenv.mkDerivation rec { SDL2 ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - installPhase = '' runHook preInstall mkdir -p "$out/bin" diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index f236bc8cd5e5..8b6c96c5286f 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -26,7 +26,6 @@ let }; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DCRABNET_ENABLE_DLL=OFF" ]; diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix index 800b97b2b86e..c56db251a1b0 100644 --- a/pkgs/games/otto-matic/default.nix +++ b/pkgs/games/otto-matic/default.nix @@ -21,8 +21,6 @@ stdenv.mkDerivation rec { SDL2 ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - installPhase = '' runHook preInstall diff --git a/pkgs/misc/drivers/epsonscan2/default.nix b/pkgs/misc/drivers/epsonscan2/default.nix index 325cbbd8707c..69c4c03b95e6 100644 --- a/pkgs/misc/drivers/epsonscan2/default.nix +++ b/pkgs/misc/drivers/epsonscan2/default.nix @@ -97,7 +97,6 @@ stdenv.mkDerivation { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" # The non-free (Debian) packages uses this directory structure so do the same when compiling # from source so we can easily merge them. "-DCMAKE_INSTALL_LIBDIR=lib/${system}-gnu" diff --git a/pkgs/misc/dumb/default.nix b/pkgs/misc/dumb/default.nix index 2a554d99b287..f80dea534a67 100644 --- a/pkgs/misc/dumb/default.nix +++ b/pkgs/misc/dumb/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { }; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE='Release'" "-DBUILD_EXAMPLES='OFF'" ]; diff --git a/pkgs/servers/domoticz/default.nix b/pkgs/servers/domoticz/default.nix index 869971d8fb89..6e50b4754438 100644 --- a/pkgs/servers/domoticz/default.nix +++ b/pkgs/servers/domoticz/default.nix @@ -51,7 +51,6 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DUSE_BUILTIN_MQTT=false" "-DUSE_BUILTIN_LUA=false" "-DUSE_BUILTIN_SQLITE=false" diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix index 74d832803b1d..36c978e364fe 100644 --- a/pkgs/servers/nosql/arangodb/default.nix +++ b/pkgs/servers/nosql/arangodb/default.nix @@ -62,10 +62,11 @@ gcc10Stdenv.mkDerivation rec { patchShebangs utils ''; + cmakeBuildType = "RelWithDebInfo"; + cmakeFlags = [ "-DUSE_MAINTAINER_MODE=OFF" "-DUSE_GOOGLE_TESTS=OFF" - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" # avoid reading /proc/cpuinfo for feature detection "-DTARGET_ARCHITECTURE=${targetArch}" diff --git a/pkgs/servers/tarantool/default.nix b/pkgs/servers/tarantool/default.nix index bdb36a7f10ad..80b2e96d2d6d 100644 --- a/pkgs/servers/tarantool/default.nix +++ b/pkgs/servers/tarantool/default.nix @@ -38,8 +38,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + cmakeBuildType = "RelWithDebInfo"; + cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DENABLE_DIST=ON" "-DTARANTOOL_VERSION=${version}.builtByNix" # expects the commit hash as well ]; diff --git a/pkgs/tools/graphics/astc-encoder/default.nix b/pkgs/tools/graphics/astc-encoder/default.nix index 5e63038e67db..4403ab255dd3 100644 --- a/pkgs/tools/graphics/astc-encoder/default.nix +++ b/pkgs/tools/graphics/astc-encoder/default.nix @@ -40,8 +40,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + cmakeBuildType = "RelWithDebInfo"; + cmakeFlags = isaFlags ++ [ - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DASTCENC_UNIVERSAL_BUILD=OFF" ]; diff --git a/pkgs/tools/misc/aspcud/default.nix b/pkgs/tools/misc/aspcud/default.nix index e3f75693803c..cd290d5e085e 100644 --- a/pkgs/tools/misc/aspcud/default.nix +++ b/pkgs/tools/misc/aspcud/default.nix @@ -27,7 +27,6 @@ stdenv.mkDerivation rec { buildInputs = [ boost clingo re2c ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DASPCUD_GRINGO_PATH=${clingo}/bin/gringo" "-DASPCUD_CLASP_PATH=${clingo}/bin/clasp" ]; diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix index 00a06b857b0d..a82d62aed0df 100644 --- a/pkgs/tools/misc/calamares/default.nix +++ b/pkgs/tools/misc/calamares/default.nix @@ -51,7 +51,6 @@ mkDerivation rec { "-DPYTHON_LIBRARY=${python}/lib/lib${python.libPrefix}.so" "-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}" "-DCMAKE_VERBOSE_MAKEFILE=True" - "-DCMAKE_BUILD_TYPE=Release" "-DWITH_PYTHONQT:BOOL=ON" ]; diff --git a/pkgs/tools/misc/clipboard-jh/default.nix b/pkgs/tools/misc/clipboard-jh/default.nix index 9cebe31dd7b8..fe4f18eea8d2 100644 --- a/pkgs/tools/misc/clipboard-jh/default.nix +++ b/pkgs/tools/misc/clipboard-jh/default.nix @@ -42,8 +42,9 @@ stdenv.mkDerivation rec { darwin.apple_sdk.frameworks.AppKit ]; + cmakeBuildType = "MinSizeRel"; + cmakeFlags = [ - "-DCMAKE_BUILD_TYPE='MinSizeRel'" "-Wno-dev" "-DINSTALL_PREFIX=${placeholder "out"}" ]; diff --git a/pkgs/tools/networking/ebpf-verifier/default.nix b/pkgs/tools/networking/ebpf-verifier/default.nix index 972c72c4e57f..8605db55bba8 100644 --- a/pkgs/tools/networking/ebpf-verifier/default.nix +++ b/pkgs/tools/networking/ebpf-verifier/default.nix @@ -39,8 +39,6 @@ stdenv.mkDerivation { yaml-cpp ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - installPhase = '' runHook preInstall diff --git a/pkgs/tools/security/sirikali/default.nix b/pkgs/tools/security/sirikali/default.nix index a3e67a2b76a5..6ae689d95fd4 100644 --- a/pkgs/tools/security/sirikali/default.nix +++ b/pkgs/tools/security/sirikali/default.nix @@ -71,7 +71,6 @@ stdenv.mkDerivation rec { doCheck = true; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=RELEASE" "-DINTERNAL_LXQT_WALLET=false" "-DNOKDESUPPORT=${if withKWallet then "false" else "true"}" "-DNOSECRETSUPPORT=${if withLibsecret then "false" else "true"}" diff --git a/pkgs/tools/system/nvtop/default.nix b/pkgs/tools/system/nvtop/default.nix index 1ab520cefac4..e47291207f08 100644 --- a/pkgs/tools/system/nvtop/default.nix +++ b/pkgs/tools/system/nvtop/default.nix @@ -38,7 +38,6 @@ stdenv.mkDerivation rec { }; cmakeFlags = with lib; [ - "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_TESTING=ON" "-DUSE_LIBUDEV_OVER_LIBSYSTEMD=ON" ] ++ optional nvidia "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"