1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00

cmake: bring back 3.9 for Darwin bootstrap

Broken by ba6e0ae33df36; see e.g. https://hydra.nixos.org/build/68223628
This commit is contained in:
Vladimír Čunát 2018-01-27 09:10:36 +01:00
parent f83b6e1130
commit ef60e41145
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 21 additions and 4 deletions

View file

@ -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) ''

View file

@ -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; };
});