Merge pull request #20191 from periklis/darwin_support_rtags

rtags: fix darwin build
This commit is contained in:
Daiderd Jordan 2016-11-07 21:08:21 +01:00 committed by GitHub
commit dcb2179a1f
2 changed files with 12 additions and 5 deletions

View file

@ -1,14 +1,19 @@
{ stdenv, fetchgit, cmake, llvmPackages, openssl, writeScript, bash, emacs }:
{ stdenv, lib, fetchgit, cmake, llvmPackages, openssl, writeScript, apple_sdk, bash, emacs }:
stdenv.mkDerivation rec {
name = "rtags-${version}";
version = "2.3";
buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs ];
buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs ]
++ lib.optional stdenv.isDarwin apple_sdk.sdk;
preConfigure = ''
export LIBCLANG_CXXFLAGS="-isystem ${llvmPackages.clang.cc}/include $(llvm-config --cxxflags)" \
LIBCLANG_LIBDIR="${llvmPackages.clang.cc}/lib"
export LIBCLANG_CXXFLAGS="-isystem ${llvmPackages.clang.cc}/include $(llvm-config --cxxflags) " \
LIBCLANG_LIBDIR="${llvmPackages.clang.cc}/lib" \
'' + lib.optionalString stdenv.isDarwin ''
export CXXFLAGS="-isysroot ${apple_sdk.sdk}/" \
MACOSX_DEPLOYMENT_TARGET="10.9"
'';
src = fetchgit {

View file

@ -5137,7 +5137,9 @@ in
rgbds = callPackage ../development/compilers/rgbds { };
rtags = callPackage ../development/tools/rtags/default.nix {};
rtags = callPackage ../development/tools/rtags/default.nix {
inherit (darwin) apple_sdk;
};
rust = rustStable;
rustStable = callPackage ../development/compilers/rust {};