···4444 export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
4545 '';
46464747- # During build, binaries are called that rely on freshly built
4848- # libraries. These reside in build/lib, and are not found by
4949- # default.
5050- preBuild = ''
5151- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib:$PWD/VTK/ThirdParty/vtkm/vtk-m/lib
5252- '';
5353-5447 cmakeFlags = [
5548 "-DCMAKE_BUILD_TYPE=Release"
5649 "-DPARAVIEW_ENABLE_FFMPEG=ON"
-4
pkgs/applications/kde/dolphin.nix
···2727 wayland qtwayland
2828 ];
2929 outputs = [ "out" "dev" ];
3030- # We need the RPATH for linking, because the `libkdeinit5_dolphin.so` links
3131- # private against its dependencies and without the correct RPATH, these
3232- # dependencies are not found.
3333- cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
3430}
-7
pkgs/applications/misc/audio/soxr/default.nix
···16161717 outputs = [ "out" "doc" ]; # headers are just two and very small
18181919- preConfigure =
2020- if stdenv.isDarwin then ''
2121- export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}"`pwd`/build/src
2222- '' else ''
2323- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}"`pwd`/build/src
2424- '';
2525-2619 nativeBuildInputs = [ cmake ];
27202821 meta = with lib; {
···6161 CXXFLAGS = [
6262 ''-DNIXPKGS_XWAYLAND=\"${lib.getBin xwayland}/bin/Xwayland\"''
6363 ];
6464- cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
6564 postInstall = ''
6665 # Some package(s) refer to these service types by the wrong name.
6766 # I would prefer to patch those packages, but I cannot find them!
-6
pkgs/development/compilers/halide/default.nix
···32323333 cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" "-DWITH_PYTHON_BINDINGS=OFF" ];
34343535- # To handle the lack of 'local' RPATH; required, as they call one of
3636- # their built binaries requiring their libs, in the build process.
3737- preBuild = ''
3838- export LD_LIBRARY_PATH="$(pwd)/src''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
3939- '';
4040-4135 # Note: only openblas and not atlas part of this Nix expression
4236 # see pkgs/development/libraries/science/math/liblapack/3.5.0.nix
4337 # to get a hint howto setup atlas instead of openblas
-6
pkgs/development/compilers/solc/default.nix
···9090 doCheck = false;
91919292 checkPhase = ''
9393- while IFS= read -r -d ''' dir
9494- do
9595- LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/$dir
9696- export LD_LIBRARY_PATH
9797- done < <(find . -type d -print0)
9898-9993 pushd ..
10094 # IPC tests need aleth avaliable, so we disable it
10195 sed -i "s/IPC_ENABLED=true/IPC_ENABLED=false\nIPC_FLAGS=\"--no-ipc\"/" ./scripts/tests.sh
···21212222 doCheck = true;
2323 checkTarget = "test";
2424- preCheck = ''
2525- export LD_LIBRARY_PATH=$PWD/libcaf_core:$PWD/libcaf_io
2626- export DYLD_LIBRARY_PATH=$PWD/libcaf_core:$PWD/libcaf_io
2727- '';
28242925 meta = with lib; {
3026 description = "An open source implementation of the actor model in C++";
-5
pkgs/development/libraries/cpp-netlib/default.nix
···1919 "-DCPP-NETLIB_BUILD_SHARED_LIBS=ON"
2020 ];
21212222- # The test driver binary lacks an RPath to the library's libs
2323- preCheck = ''
2424- export LD_LIBRARY_PATH=$PWD/libs/network/src
2525- '';
2626-2722 # Most tests make network GET requests to various websites
2823 doCheck = false;
2924
···17171818 cmakeFlags = [
1919 "-DBUILD_SHARED_LIBS=ON"
2020- # Mak CMake place RPATHs such that tests will find the built libraries.
2121- # See https://github.com/NixOS/nixpkgs/pull/144561#discussion_r742468811 and https://github.com/NixOS/nixpkgs/pull/108496
2222- "-DCMAKE_SKIP_BUILD_RPATH=OFF"
2320 ];
24212522 # TODO: Re-enable Darwin tests once we're on a release that has https://github.com/google/glog/issues/709#issuecomment-960381653 fixed
···87878888 doCheck = true;
89899090- # needed to find libigraph, and liblas on darwin
9191- preCheck = if stdenv.isDarwin then ''
9292- export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [ blas ]}:$PWD/src"
9393- '' else ''
9494- export LD_LIBRARY_PATH="$PWD/src"
9595- '';
9696-9790 postInstall = ''
9891 mkdir -p "$out/share"
9992 cp -r doc "$out/share"
-8
pkgs/development/libraries/jsoncpp/default.nix
···4343 sed -i 's/#define JSONCPP_USING_SECURE_MEMORY 0/#define JSONCPP_USING_SECURE_MEMORY 1/' include/json/version.h
4444 '';
45454646- # Hack to be able to run the test, broken because we use
4747- # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
4848- preBuild = if stdenv.isDarwin then ''
4949- export DYLD_LIBRARY_PATH="$PWD/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
5050- '' else ''
5151- export LD_LIBRARY_PATH="$PWD/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
5252- '';
5353-5446 nativeBuildInputs = [ cmake python3 validatePkgConfig ];
55475648 cmakeFlags = [
-1
pkgs/development/libraries/leveldb/default.nix
···3636 # NOTE: disabling tests due to gtest issue
3737 cmakeFlags = [
3838 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
3939- "-DCMAKE_SKIP_BUILD_RPATH=OFF"
4039 "-DLEVELDB_BUILD_TESTS=OFF"
4140 "-DLEVELDB_BUILD_BENCHMARKS=OFF"
4241 ];
···129129130130 doCheck = !stdenv.hostPlatform.isi686;
131131132132- # The test driver runs a test `LibraryCLinkageTest` which without
133133- # LD_LIBRARY_PATH setting errors with:
134134- # /build/source/build/tools/tests/libjxl_test: error while loading shared libraries: libjxl.so.0
135135- # The required file is in the build directory (`$PWD`).
136136- preCheck = if stdenv.isDarwin then ''
137137- export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD
138138- '' else ''
139139- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
140140- '';
141141-142132 meta = with lib; {
143133 homepage = "https://github.com/libjxl/libjxl";
144134 description = "JPEG XL image format reference implementation.";
···2121 # Tests fail on some Hydra builders, because they do not support SSE4.2.
2222 doCheck = false;
23232424- # The test driver doesn't add an RPath to the build libdir
2525- preCheck = ''
2626- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/src
2727- export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/src
2828- '';
2929-3024 # The cmake install gets tripped up and installs a nix tree into $out, in
3125 # addition to the correct install; clean it up.
3226 postInstall = ''
-5
pkgs/development/libraries/orcania/default.nix
···18181919 doCheck = true;
20202121- preCheck = ''
2222- export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
2323- export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH"
2424- '';
2525-2621 meta = with lib; {
2722 description = "Potluck with different functions for different purposes that can be shared among C programs";
2823 homepage = "https://github.com/babelouest/orcania";
···22222323 checkInputs = [ check ];
24242525- # Hack to be able to run the test, broken because we use
2626- # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
2727- preCheck = if stdenv.isDarwin then ''
2828- export DYLD_LIBRARY_PATH="$(pwd)''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
2929- '' else ''
3030- export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
3131- '';
3232-3325 preConfigure = ''
3426 # Enable long long support (required for filezilla)
3527 sed -ire '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp
···67676868 # Run single threaded
6969 export OMP_NUM_THREADS=1
7070-7171- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib
7270 '';
73717472 meta = with lib; {
···102102 cmakeFlags="-DBUILD_TESTING=OFF $cmakeFlags"
103103 fi
104104105105- # Avoid cmake resetting the rpath of binaries, on make install
106106- # And build always Release, to ensure optimisation flags
107107- cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags"
105105+ # Always build Release, to ensure optimisation flags
106106+ cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} $cmakeFlags"
108107109108 # Disable user package registry to avoid potential side effects
110109 # and unecessary attempts to access non-existent home folder
···108108 "-DTCAM_INTERNAL_ARAVIS=OFF"
109109 "-DTCAM_ARAVIS_USB_VISION=${if withAravis && withAravisUsbVision then "ON" else "OFF"}"
110110 "-DTCAM_INSTALL_FORCE_PREFIX=ON"
111111- # There are gobject introspection commands launched as part of the build. Those have a runtime
112112- # dependency on `libtcam` (which itself is built as part of this build). In order to allow
113113- # that, we set the dynamic linker's path to point on the build time location of the library.
114114- "-DCMAKE_SKIP_BUILD_RPATH=OFF"
115111 ];
116112117113 doCheck = true;
-1
pkgs/servers/sql/mysql/5.7.x.nix
···3131 outputs = [ "out" "static" ];
32323333 cmakeFlags = [
3434- "-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
3534 "-DWITH_SSL=yes"
3635 "-DWITH_EMBEDDED_SERVER=yes"
3736 "-DWITH_UNIT_TESTS=no"
-1
pkgs/servers/sql/mysql/8.0.x.nix
···3434 outputs = [ "out" "static" ];
35353636 cmakeFlags = [
3737- "-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
3837 "-DFORCE_UNSUPPORTED_COMPILER=1" # To configure on Darwin.
3938 "-DWITH_ROUTER=OFF" # It may be packaged separately.
4039 "-DWITH_SYSTEM_LIBS=ON"
-1
pkgs/tools/backup/percona-xtrabackup/generic.nix
···4545 "-DWITH_ZLIB=system"
4646 "-DWITH_VALGRIND=ON"
4747 "-DWITH_MAN_PAGES=OFF"
4848- "-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
4948 ];
50495150 postInstall = ''
-2
pkgs/tools/filesystems/ceph/default.nix
···184184 substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
185185 substituteInPlace src/common/module.c --replace "/bin/grep" "grep"
186186187187- # for pybind/rgw to find internal dep
188188- export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
189187 # install target needs to be in PYTHONPATH for "*.pth support" check to succeed
190188 # set PYTHONPATH, so the build system doesn't silently skip installing ceph-volume and others
191189 export PYTHONPATH=${ceph-python-env}/${sitePackages}:$lib/${sitePackages}:$out/${sitePackages}