diff options
Diffstat (limited to 'pkgs/by-name/cm/cmake/package.nix')
-rw-r--r-- | pkgs/by-name/cm/cmake/package.nix | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index bba4bfc7afb88..241f1051a8aed 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -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; |