diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 9357c1a3a85d..fed88561cf9c 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash +, majorVersion ? "3.10" # darwin attributes , ps , isBootstrap ? false @@ -14,10 +15,23 @@ assert useQt4 -> withQt5 == false; with stdenv.lib; +with ( + { + "3.10" = { + minorVersion = "2"; + sha256 = "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b"; + }; + "3.9" = { + minorVersion = "6"; + sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218"; + }; + + }.${majorVersion} + or (abort ''Unsupported configuration for cmake: majorVersion = "${majorVersion}";'') +); + let os = stdenv.lib.optionalString; - majorVersion = "3.10"; - minorVersion = "2"; version = "${majorVersion}.${minorVersion}"; in @@ -29,7 +43,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; # from https://cmake.org/files/v3.10/cmake-3.10.2-SHA-256.txt - sha256 = "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b"; + inherit sha256; }; prePatch = optionalString (!useSharedLibraries) '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b24c98499cb..1f1aa0acc8c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6348,7 +6348,10 @@ with pkgs; llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({ inherit (stdenvAdapters) overrideCC; } // stdenv.lib.optionalAttrs stdenv.isDarwin { - cmake = cmake.override { isBootstrap = true; }; + cmake = cmake.override { + isBootstrap = true; + majorVersion = "3.9"; # 3.10.2: 'ApplicationServices/ApplicationServices.h' file not found + }; libxml2 = libxml2.override { pythonSupport = false; }; python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; }; });