build nix head successfully

This commit is contained in:
Joel Taylor 2014-08-23 18:26:55 -07:00
parent 6f949b2e87
commit fa9b1f9cda
6 changed files with 18 additions and 15 deletions

View File

@ -1,9 +1,5 @@
{ stdenv, fetchurl, perl, groff, llvm, cmake, libxml2, python }: { stdenv, fetchurl, perl, groff, llvm, cmake, libxml2, python }:
# be sure not to rebuild clang on darwin; some packages request it specifically
# we need to fix those
assert stdenv.isDarwin -> stdenv.gcc.nativeTools;
let let
version = "3.3"; version = "3.3";
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc; gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;

View File

@ -1,5 +1,9 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }: { stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
# be sure not to rebuild clang on darwin; some packages request it specifically
# we need to fix those
assert stdenv.isDarwin -> stdenv.gcc.nativeTools;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "clang-${version}"; name = "clang-${version}";

View File

@ -1,4 +1,6 @@
{ stdenv, pkgs, config, haveLibCxx }: { stdenv, pkgs, config
, haveLibCxx ? true
, useClang33 ? false }:
import ../generic rec { import ../generic rec {
inherit config; inherit config;
@ -33,7 +35,7 @@ import ../generic rec {
}; };
} else null; } else null;
binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}; binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;};
clang = pkgs.clang_34; clang = if useClang33 then pkgs.clang_33 else pkgs.clang;
coreutils = pkgs.coreutils; coreutils = pkgs.coreutils;
shell = pkgs.bash + "/bin/sh"; shell = pkgs.bash + "/bin/sh";
}; };

View File

@ -37,7 +37,6 @@ rec {
inherit config; inherit config;
stdenv = stdenvNative; stdenv = stdenvNative;
pkgs = stdenvNativePkgs; pkgs = stdenvNativePkgs;
haveLibCxx = true;
}; };
stdenvDarwinNaked = import ./darwin { stdenvDarwinNaked = import ./darwin {
@ -47,6 +46,13 @@ rec {
haveLibCxx = false; haveLibCxx = false;
}; };
stdenvDarwin33 = import ./darwin {
inherit config;
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
useClang33 = true;
};
# Linux standard environment. # Linux standard environment.
stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux; stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux;

View File

@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
postUnpack = postUnpack =
'' export CPATH="${bzip2}/include" '' export CPATH="${bzip2}/include"
export LIBRARY_PATH="${bzip2}/lib" export LIBRARY_PATH="${bzip2}/lib"
export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal"
''; '';
configureFlags = configureFlags =
@ -68,9 +69,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = {
# due to builder args bug; see
# https://github.com/NixOS/nix/commit/b224ac15201c57b40ea855f5a98b1bd166c1c7f6
broken = stdenv.isDarwin;
description = "The Nix Deployment System"; description = "The Nix Deployment System";
homepage = http://nixos.org/; homepage = http://nixos.org/;
license = stdenv.lib.licenses.lgpl2Plus; license = stdenv.lib.licenses.lgpl2Plus;

View File

@ -3209,11 +3209,7 @@ let
llvm_v = path: callPackage path { }; llvm_v = path: callPackage path { };
llvmPackages = if !stdenv.isDarwin then llvmPackages_34 else llvmPackages_34 // { llvmPackages = llvmPackages_34;
# until someone solves build problems with _34
llvm = llvm_33;
clang = clang_33;
};
llvmPackages_34 = recurseIntoAttrs (import ../development/compilers/llvm/3.4 { llvmPackages_34 = recurseIntoAttrs (import ../development/compilers/llvm/3.4 {
inherit stdenv newScope fetchurl; inherit stdenv newScope fetchurl;
@ -11455,6 +11451,7 @@ let
}; };
nixUnstable = callPackage ../tools/package-management/nix/unstable.nix { nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
stdenv = if stdenv.isDarwin then allStdenvs.stdenvDarwin33 else stdenv;
storeDir = config.nix.storeDir or "/nix/store"; storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var"; stateDir = config.nix.stateDir or "/nix/var";
}; };