From 6967498370791ef38ec4d8d5c19b3b744ae28882 Mon Sep 17 00:00:00 2001 From: babariviere Date: Thu, 1 Mar 2018 18:03:42 +0100 Subject: [PATCH] fix LD_PRELOAD error for bear --- lib/maintainers.nix | 1 + .../tools/build-managers/bear/cmakepaths.patch | 13 +++++++++++++ .../tools/build-managers/bear/default.nix | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/tools/build-managers/bear/cmakepaths.patch diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 71b2a7a08bba..76379a02ffbb 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -71,6 +71,7 @@ auntie = "Jonathan Glines "; avnik = "Alexander V. Nikolaev "; aycanirican = "Aycan iRiCAN "; + babariviere = "Bastien Riviere "; bachp = "Pascal Bach "; backuitist = "Bruno Bieth"; badi = "Badi' Abdul-Wahid "; diff --git a/pkgs/development/tools/build-managers/bear/cmakepaths.patch b/pkgs/development/tools/build-managers/bear/cmakepaths.patch new file mode 100644 index 000000000000..d237267078e6 --- /dev/null +++ b/pkgs/development/tools/build-managers/bear/cmakepaths.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 04c5c58..429ca47 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,7 @@ set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Rogue") + + set(EAR_LIB_FILE ${CMAKE_SHARED_LIBRARY_PREFIX}ear${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(EAR_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/bear") +-set(DEFAULT_PRELOAD_FILE ${CMAKE_INSTALL_PREFIX}/${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") ++set(DEFAULT_PRELOAD_FILE ${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") + + add_subdirectory(libear) + add_subdirectory(bear) diff --git a/pkgs/development/tools/build-managers/bear/default.nix b/pkgs/development/tools/build-managers/bear/default.nix index 6afec72de5fd..8f352f84b228 100644 --- a/pkgs/development/tools/build-managers/bear/default.nix +++ b/pkgs/development/tools/build-managers/bear/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { doCheck = false; # all fail - patches = [ ./ignore_wrapper.patch ]; + patches = [ ./ignore_wrapper.patch ./cmakepaths.patch ]; meta = with stdenv.lib; { description = "Tool that generates a compilation database for clang tooling"; @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { homepage = https://github.com/rizsotto/Bear; license = licenses.gpl3Plus; platforms = platforms.unix; - maintainers = [ maintainers.vcunat ]; + maintainers = [ maintainers.vcunat maintainers.babariviere ]; }; }