nixpkgs/pkgs/development/compilers/llvm/default.nix
Shea Levy 6e3cde6383 Enable building clang separately from llvm
Note that there is some duplication when building clang now. The llvm source
is unpacked twice, ./configure is run twice, and two small unit test
libraries are compiled twice. IMO this is a fair tradeoff for having
llvm be a separate build unaffected by changes to clang

svn path=/nixpkgs/trunk/; revision=29919
2011-10-19 20:57:18 +00:00

29 lines
783 B
Nix

{ stdenv, fetchurl, perl, groff }:
let version = "2.9"; in
stdenv.mkDerivation {
name = "llvm-${version}";
CC = if stdenv.gcc ? clang then "clang" else "gcc";
CXX = if stdenv.gcc ? clang then "clang++" else "g++";
src = fetchurl {
url = "http://llvm.org/releases/${version}/llvm-${version}.tgz";
sha256 = "0y9pgdakn3n0vf8zs6fjxjw6972nyw4rkfwwza6b8a3ll77kc4k6";
};
buildInputs = [ perl groff ];
configureFlags = [ "--enable-optimized" "--enable-shared" "--disable-static" ];
meta = {
homepage = http://llvm.org/;
description = "Collection of modular and reusable compiler and toolchain technologies";
license = "BSD";
maintainers = with stdenv.lib.maintainers; [viric shlevy];
platforms = with stdenv.lib.platforms; all;
};
}