cmake: rename isBootstrap to isMinimalBuild

Indeed there is few to no reason to call this "isBootstrap" since we do not
build cmake by using a previous cmake.

Also, add a warning to the use of the old option.
This commit is contained in:
Anderson Torres 2023-10-24 23:20:47 -03:00
parent 9f4436aa8c
commit c9eb8d14da
2 changed files with 17 additions and 11 deletions

View File

@ -4,10 +4,8 @@
, buildPackages
, bzip2
, curlMinimal
, darwin
, expat
, libarchive
, libsForQt5
, libuv
, ncurses
, openssl
@ -18,11 +16,19 @@
, texinfo
, xz
, zlib
, buildDocs ? !(isBootstrap || (uiToolkits == []))
, isBootstrap ? false
, isBootstrap ? null
, isMinimalBuild ? (
if isBootstrap != null
then lib.warn
"isBootstrap argument is deprecated and will be removed; use isMinimalBuild instead"
isBootstrap
else false)
, useOpenSSL ? !isMinimalBuild
, useSharedLibraries ? (!isMinimalBuild && !stdenv.isCygwin)
, uiToolkits ? [] # can contain "ncurses" and/or "qt5"
, useOpenSSL ? !isBootstrap
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
, buildDocs ? !(isMinimalBuild || (uiToolkits == []))
, darwin
, libsForQt5
}:
let
@ -34,10 +40,10 @@ in
# Accepts only "ncurses" and "qt5" as possible uiToolkits
assert lib.subtractLists [ "ncurses" "qt5" ] uiToolkits == [];
# Minimal, bootstrap cmake does not have toolkits
assert isBootstrap -> (uiToolkits == []);
assert isMinimalBuild -> (uiToolkits == []);
stdenv.mkDerivation (finalAttrs: {
pname = "cmake"
+ lib.optionalString isBootstrap "-boot"
+ lib.optionalString isMinimalBuild "-minimal"
+ lib.optionalString cursesUI "-cursesUI"
+ lib.optionalString qt5UI "-qt5UI";
version = "3.26.4";
@ -57,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optional stdenv.isCygwin ./004-cygwin.diff
# Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51
++ lib.optional (stdenv.isDarwin && isBootstrap) ./005-remove-systemconfiguration-dep.diff
++ lib.optional (stdenv.isDarwin && isMinimalBuild) ./005-remove-systemconfiguration-dep.diff
# On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG.
++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff;
@ -90,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional useOpenSSL openssl
++ lib.optional cursesUI ncurses
++ lib.optional qt5UI qtbase
++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration;
++ lib.optional (stdenv.isDarwin && !isMinimalBuild) SystemConfiguration;
propagatedBuildInputs = lib.optional stdenv.isDarwin ps;

View File

@ -18930,7 +18930,7 @@ with pkgs;
# can't use override - it triggers infinite recursion
cmakeMinimal = callPackage ../by-name/cm/cmake/package.nix {
isBootstrap = true;
isMinimalBuild = true;
};
cmakeCurses = cmake.override {