treewide: fix fallout from 'cmake/setup-hook.sh: Don't skip build-RPATH'

This commit is contained in:
Artturin 2022-07-19 17:44:16 +03:00
parent cfe78489c9
commit 6b8c65acd9
5 changed files with 20 additions and 1 deletions

View File

@ -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";

View File

@ -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

View File

@ -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" \

View File

@ -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) ''

View File

@ -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";