nixpkgs/pkgs/development/compilers/llvm/default.nix
Vladimír Čunát 625f40151b Merge branch 'master' into x-updates
Conflicts (a little tricky, I did some cleanup of interacting changes):
	pkgs/development/compilers/llvm/default.nix
	pkgs/development/libraries/libpng/default.nix
	pkgs/tools/package-management/nixops/default.nix
	pkgs/top-level/all-packages.nix
2013-08-02 18:30:53 +02:00

38 lines
1.3 KiB
Nix

{ stdenv, fetchurl, perl, groff, cmake, python, libffi }:
let version = "3.3"; in
stdenv.mkDerivation {
name = "llvm-${version}";
src = fetchurl {
url = "http://llvm.org/releases/${version}/llvm-${version}.src.tar.gz";
sha256 = "0y3mfbb5qzcpw3v5qncn69x1hdrrrfirgs82ypi2annhf0g6nxk8";
};
# The default rlimits are too low for shared libraries.
patches = [ ./more-memory-for-bugpoint.patch ];
# libffi was propagated before, but it wasn't even being used, so
# unless something needs it just an input is fine.
buildInputs = [ perl groff cmake python libffi ]; # ToDo: polly, libc++; enable cxx11?
# hacky fix: created binaries need to be run before installation
preBuild = let LD = if stdenv.isDarwin then "DYLD" else "LD";
in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib";
cmakeFlags = with stdenv; [ "-DCMAKE_BUILD_TYPE=Release" "-DLLVM_ENABLE_FFI=ON" ]
++ lib.optional (!isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ];
enableParallelBuilding = true;
doCheck = true;
meta = with stdenv.lib; {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = licenses.bsd3;
maintainers = with maintainers; [ lovek323 raskin shlevy viric ];
platforms = platforms.all;
};
}