2017-06-26 20:25:14 +02:00
|
|
|
{ lowPrio, newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
|
2017-02-18 20:53:46 +01:00
|
|
|
let
|
2017-03-18 21:48:27 +01:00
|
|
|
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
|
2017-02-18 20:53:46 +01:00
|
|
|
|
2017-06-27 15:23:43 +02:00
|
|
|
release_version = "4.0.1";
|
2017-03-13 20:54:39 +01:00
|
|
|
version = release_version; # differentiating these is important for rc's
|
2017-02-18 20:53:46 +01:00
|
|
|
|
2017-02-19 21:33:47 +01:00
|
|
|
fetch = name: sha256: fetchurl {
|
2017-03-13 20:54:39 +01:00
|
|
|
url = "http://llvm.org/releases/${release_version}/${name}-${version}.src.tar.xz";
|
2017-02-18 20:53:46 +01:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2017-06-27 15:23:43 +02:00
|
|
|
compiler-rt_src = fetch "compiler-rt" "0h5lpv1z554szi4r4blbskhwrkd78ir50v3ng8xvk1s86fa7gj53";
|
|
|
|
clang-tools-extra_src = fetch "clang-tools-extra" "1dhmp7ccfpr42bmvk3kp37ngjpf3a9m5d4kkpsn7d00hzi7fdl9m";
|
2017-02-18 20:53:46 +01:00
|
|
|
|
2017-06-24 13:11:43 +02:00
|
|
|
# Add man output without introducing extra dependencies.
|
|
|
|
overrideManOutput = drv:
|
|
|
|
let drv-manpages = drv.override { enableManpages = true; }; in
|
2017-07-13 13:07:42 +02:00
|
|
|
drv // { man = drv-manpages.man; /*outputs = drv.outputs ++ ["man"];*/ };
|
2017-06-24 13:11:43 +02:00
|
|
|
|
|
|
|
llvm = callPackage ./llvm.nix {
|
|
|
|
inherit compiler-rt_src stdenv;
|
|
|
|
};
|
|
|
|
|
|
|
|
clang-unwrapped = callPackage ./clang {
|
|
|
|
inherit clang-tools-extra_src stdenv;
|
|
|
|
};
|
|
|
|
|
2017-02-18 20:53:46 +01:00
|
|
|
self = {
|
2017-06-24 13:11:43 +02:00
|
|
|
llvm = overrideManOutput llvm;
|
|
|
|
clang-unwrapped = overrideManOutput clang-unwrapped;
|
2017-02-18 20:53:46 +01:00
|
|
|
|
2017-06-26 20:25:14 +02:00
|
|
|
llvm-manpages = lowPrio self.llvm.man;
|
|
|
|
clang-manpages = lowPrio self.clang-unwrapped.man;
|
2017-02-18 20:53:46 +01:00
|
|
|
|
|
|
|
clang = wrapCC self.clang-unwrapped;
|
|
|
|
|
2017-04-29 03:30:55 +02:00
|
|
|
openmp = callPackage ./openmp.nix {};
|
|
|
|
|
2017-02-18 20:53:46 +01:00
|
|
|
libcxxClang = ccWrapperFun {
|
|
|
|
cc = self.clang-unwrapped;
|
|
|
|
isClang = true;
|
|
|
|
inherit (self) stdenv;
|
|
|
|
/* FIXME is this right? */
|
|
|
|
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
|
|
|
extraPackages = [ self.libcxx self.libcxxabi ];
|
|
|
|
};
|
|
|
|
|
|
|
|
stdenv = overrideCC stdenv self.clang;
|
|
|
|
|
|
|
|
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
|
|
|
|
|
|
|
lld = callPackage ./lld.nix {};
|
|
|
|
|
|
|
|
lldb = callPackage ./lldb.nix {};
|
|
|
|
|
|
|
|
libcxx = callPackage ./libc++ {};
|
|
|
|
|
|
|
|
libcxxabi = callPackage ./libc++abi.nix {};
|
|
|
|
};
|
|
|
|
in self
|