cmake: incorporate darwin and libsForQt5 into its expression

This commit is contained in:
AndersonTorres 2022-12-11 22:21:24 -03:00
parent d9411df65b
commit 568e01e675
2 changed files with 10 additions and 14 deletions

View file

@ -1,37 +1,40 @@
{ lib
, stdenv
, fetchurl
, buildPackages
, bzip2
, curlMinimal
, expat
, fetchurl
, libarchive
, libuv
, ncurses
, openssl
, pkg-config
, qtbase
, ps
, rhash
, sphinx
, texinfo
, wrapQtAppsHook
, xz
, zlib
, SystemConfiguration
, ps
, isBootstrap ? false
, useOpenSSL ? !isBootstrap
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
, uiToolkits ? [] # can contain "ncurses" and/or "qt5"
, buildDocs ? !(isBootstrap || (uiToolkits == []))
, darwin
, libsForQt5
}:
let
inherit (darwin.apple_sdk.frameworks) SystemConfiguration;
inherit (libsForQt5) qtbase wrapQtAppsHook;
cursesUI = lib.elem "ncurses" uiToolkits;
qt5UI = lib.elem "qt5" uiToolkits;
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 == []);
stdenv.mkDerivation rec {
pname = "cmake"
+ lib.optionalString isBootstrap "-boot"

View file

@ -16933,18 +16933,11 @@ with pkgs;
ctmg = callPackage ../tools/security/ctmg { };
cmake = callPackage ../development/tools/build-managers/cmake {
inherit (darwin.apple_sdk.frameworks) SystemConfiguration;
inherit (libsForQt5) qtbase wrapQtAppsHook;
};
cmake = callPackage ../development/tools/build-managers/cmake { };
# can't use override - it triggers infinite recursion
cmakeMinimal = callPackage ../development/tools/build-managers/cmake {
isBootstrap = true;
qtbase = null;
wrapQtAppsHook = null;
# There is no SystemConfiguration in bootstrapTools, so this version gets
# patched to remove that dependency.
SystemConfiguration = null;
};
cmakeCurses = cmake.override {