rtags: fix darwin build

Adds dependency to MacOS_SDK 10.9 and accordingly to the macosx
deployment target to configure SDK-based deployment in rtags. In detail,
rtags makes use of launch_activate_socket() which is available in
launchd.h >10.9. Latter is still not available through
apple-opensource-releases, if ever. Thus, the deployment target and
build input have to be added to let rtags build scripts make use of MAC_OS_X_VERSION_MAX_ALLOWED correctly.
This commit is contained in:
Periklis Tsirakidis 2016-11-05 17:14:41 +01:00
parent aa094fe084
commit 184aefa3c4
2 changed files with 13 additions and 5 deletions

View file

@ -1,14 +1,20 @@
{ 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

@ -5130,7 +5130,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 {};