Skip to content

Commit

Permalink
build nix head successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Taylor committed Aug 24, 2014
1 parent 1926162 commit a5a82fa
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
4 changes: 0 additions & 4 deletions pkgs/development/compilers/llvm/3.3/clang.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{ 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
version = "3.3";
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/development/compilers/llvm/3.4/clang.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{ 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 {
name = "clang-${version}";

Expand Down
6 changes: 4 additions & 2 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ stdenv, pkgs, config, haveLibCxx }:
{ stdenv, pkgs, config
, haveLibCxx ? true
, useClang33 ? false }:

import ../generic rec {
inherit config;
Expand Down Expand Up @@ -33,7 +35,7 @@ import ../generic rec {
};
} else null;
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;
shell = pkgs.bash + "/bin/sh";
};
Expand Down
8 changes: 7 additions & 1 deletion pkgs/stdenv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ rec {
inherit config;
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
haveLibCxx = true;
};

stdenvDarwinNaked = import ./darwin {
Expand All @@ -47,6 +46,13 @@ rec {
haveLibCxx = false;
};

stdenvDarwin33 = import ./darwin {
inherit config;
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
useClang33 = true;
};


# Linux standard environment.
stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux;
Expand Down
10 changes: 4 additions & 6 deletions pkgs/tools/package-management/nix/unstable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
}:

stdenv.mkDerivation rec {
name = "nix-1.8pre3766_809ca33";
name = "nix-1.8pre3768_3f0a4bf";

src = fetchurl {
url = "http://hydra.nixos.org/build/13584170/download/5/${name}.tar.xz";
sha256 = "e6d91e73aabf8e8912f9701bf87b66089c197c5b8c8fbcc1707b888c88b96dfd";
url = "http://hydra.nixos.org/build/13619451/download/5/${name}.tar.xz";
sha256 = "1dmxbc8hv2di2hy7s7xfj5bbyw2gz58hwf9kj1prb171cy8jksf1";
};

nativeBuildInputs = [ perl pkgconfig ];
Expand All @@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
postUnpack =
'' export CPATH="${bzip2}/include"
export LIBRARY_PATH="${bzip2}/lib"
export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal"
'';

configureFlags =
Expand Down Expand Up @@ -68,9 +69,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;

meta = {
# due to builder args bug; see
# https://github.com/NixOS/nix/commit/b224ac15201c57b40ea855f5a98b1bd166c1c7f6
broken = stdenv.isDarwin;
description = "The Nix Deployment System";
homepage = http://nixos.org/;
license = stdenv.lib.licenses.lgpl2Plus;
Expand Down
7 changes: 2 additions & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3123,11 +3123,7 @@ let

llvm_v = path: callPackage path { };

llvmPackages = if !stdenv.isDarwin then llvmPackages_34 else llvmPackages_34 // {
# until someone solves build problems with _34
llvm = llvm_33;
clang = clang_33;
};
llvmPackages = llvmPackages_34;

llvmPackages_34 = recurseIntoAttrs (import ../development/compilers/llvm/3.4 {
inherit stdenv newScope fetchurl;
Expand Down Expand Up @@ -11237,6 +11233,7 @@ let
};

nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
stdenv = if stdenv.isDarwin then allStdenvs.stdenvDarwin33 else stdenv;
storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var";
};
Expand Down

0 comments on commit a5a82fa

Please sign in to comment.