From 6b8c65acd97bb59c917a018f9c84061f91e26e1a Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 19 Jul 2022 17:44:16 +0300 Subject: [PATCH] treewide: fix fallout from 'cmake/setup-hook.sh: Don't skip build-RPATH' --- pkgs/applications/audio/in-formant/default.nix | 3 +++ pkgs/applications/science/misc/simgrid/default.nix | 5 +++++ pkgs/applications/video/ccextractor/default.nix | 5 ++++- pkgs/development/libraries/galario/default.nix | 6 ++++++ pkgs/development/tools/qtcreator/default.nix | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/in-formant/default.nix b/pkgs/applications/audio/in-formant/default.nix index 7cf0fb8c1454..5fb36b034506 100644 --- a/pkgs/applications/audio/in-formant/default.nix +++ b/pkgs/applications/audio/in-formant/default.nix @@ -35,6 +35,9 @@ stdenv.mkDerivation rec { cp in-formant $out/bin ''; + # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ + cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; + meta = with lib; { description = "A real-time pitch and formant tracking software"; homepage = "https://github.com/in-formant/in-formant"; diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix index 4aaf6665b00c..8db9245ed33e 100644 --- a/pkgs/applications/science/misc/simgrid/default.nix +++ b/pkgs/applications/science/misc/simgrid/default.nix @@ -76,6 +76,11 @@ stdenv.mkDerivation rec { patchShebangs .. ''; + # needed by tests (so libsimgrid.so is found) + preConfigure = '' + export LD_LIBRARY_PATH="$PWD/build/lib" + ''; + doCheck = true; preCheck = '' # prevent the execution of tests known to fail diff --git a/pkgs/applications/video/ccextractor/default.nix b/pkgs/applications/video/ccextractor/default.nix index 905034091a29..26954375aff5 100644 --- a/pkgs/applications/video/ccextractor/default.nix +++ b/pkgs/applications/video/ccextractor/default.nix @@ -36,7 +36,10 @@ stdenv.mkDerivation rec { ++ lib.optional (!stdenv.isLinux) libiconv ++ lib.optionals enableOcr [ leptonica tesseract4 ffmpeg ]; - cmakeFlags = lib.optionals enableOcr [ "-DWITH_OCR=on" "-DWITH_HARDSUBX=on" ]; + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH: + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ] ++ lib.optionals enableOcr [ "-DWITH_OCR=on" "-DWITH_HARDSUBX=on" ]; postInstall = lib.optionalString enableOcr '' wrapProgram "$out/bin/ccextractor" \ diff --git a/pkgs/development/libraries/galario/default.nix b/pkgs/development/libraries/galario/default.nix index 8454bcfc219f..ac7e4f4255e8 100644 --- a/pkgs/development/libraries/galario/default.nix +++ b/pkgs/development/libraries/galario/default.nix @@ -49,9 +49,15 @@ stdenv.mkDerivation rec { ''; preCheck = '' + ${if stdenv.isDarwin then "export DYLD_LIBRARY_PATH=$(pwd)/src/" else "export LD_LIBRARY_PATH=$(pwd)/src/"} ${if enablePython then "sed -i -e 's|^#!.*|#!${stdenv.shell}|' python/py.test.sh" else ""} ''; + cmakeFlags = lib.optionals enablePython [ + # RPATH of binary /nix/store/.../lib/python3.10/site-packages/galario/double/libcommon.so contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + doCheck = true; postInstall = lib.optionalString (stdenv.isDarwin && enablePython) '' diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix index 04557a27f740..cc1baad2bb0e 100644 --- a/pkgs/development/tools/qtcreator/default.nix +++ b/pkgs/development/tools/qtcreator/default.nix @@ -9,6 +9,8 @@ let # Fetch clang from qt vendor, this contains submodules like this: # clang<-clang-tools-extra<-clazy. clang_qt_vendor = llvmPackages_8.clang-unwrapped.overrideAttrs (oldAttrs: { + # file RPATH_CHANGE could not write new RPATH + cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; src = fetchgit { url = "https://code.qt.io/clang/clang.git"; rev = "c12b012bb7465299490cf93c2ae90499a5c417d5";