3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libc++/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, cmake, libcxxabi, fixDarwinDylibNames }:
2012-10-08 07:32:09 +01:00
let version = "3.4.2"; in
2012-10-08 07:32:09 +01:00
stdenv.mkDerivation rec {
name = "libc++-${version}";
2012-10-08 07:32:09 +01:00
src = fetchurl {
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.gz";
sha256 = "0z3jdvgcq995khkpis5c5vaxhbmvbqjlalbhn09k6pgb5zp46rc2";
};
patches = [ ./darwin.patch ];
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags =
[ "-DCMAKE_BUILD_TYPE=Release"
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi"
];
2012-10-08 07:32:09 +01:00
enableParallelBuilding = true;
passthru.abi = libcxxabi;
# Remove a Makefile that causes many retained dependencies.
postInstall = "rm $out/include/c++/v1/Makefile";
2012-10-08 07:32:09 +01:00
meta = {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD";
maintainers = [ stdenv.lib.maintainers.shlevy ];
2014-08-22 00:15:31 +01:00
platforms = stdenv.lib.platforms.unix;
2012-10-08 07:32:09 +01:00
};
}