From 83b4764dc3154eac2a5b4bde444ecd7aa10b1039 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 12 Jul 2022 18:20:45 +0300 Subject: [PATCH] treewide: fix fallout from 'cmake/setup-hook.sh: Don't skip build-RPATH' f7414e2b3ac69f220e19b1ef9ddfe8d64650c5ca --- pkgs/applications/science/logic/btor2tools/default.nix | 5 +++++ pkgs/development/compilers/seexpr/default.nix | 6 +++++- .../development/compilers/spirv-llvm-translator/default.nix | 2 ++ pkgs/development/compilers/zig/default.nix | 5 +++++ pkgs/development/embedded/xc3sprog/default.nix | 5 +++++ pkgs/development/libraries/codec2/default.nix | 5 +++++ pkgs/development/libraries/ctpp2/default.nix | 5 +++++ pkgs/development/libraries/science/math/metis/default.nix | 6 +++++- pkgs/tools/graphics/waifu2x-converter-cpp/default.nix | 5 +++++ 9 files changed, 42 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/btor2tools/default.nix b/pkgs/applications/science/logic/btor2tools/default.nix index 992d8b1de58f..0cb9c8037cb2 100644 --- a/pkgs/applications/science/logic/btor2tools/default.nix +++ b/pkgs/applications/science/logic/btor2tools/default.nix @@ -23,6 +23,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "lib" ]; + cmakeFlags = [ + # RPATH of binary /nix/store/.../bin/btorsim contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + meta = with lib; { description = "A generic parser and tool package for the BTOR2 format"; homepage = "https://github.com/Boolector/btor2tools"; diff --git a/pkgs/development/compilers/seexpr/default.nix b/pkgs/development/compilers/seexpr/default.nix index f13ec5174d5a..b07a91599332 100644 --- a/pkgs/development/compilers/seexpr/default.nix +++ b/pkgs/development/compilers/seexpr/default.nix @@ -22,7 +22,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-r6mgyb/FGz4KYZOgLDgmIqjO+PSmneD3KUWjymZXtEk="; }; - cmakeFlags = [ "-DENABLE_SSE4=OFF" ]; + cmakeFlags = [ + "-DENABLE_SSE4=OFF" + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; nativeBuildInputs = [ cmake ]; buildInputs = [ libGLU libpng zlib qt4 python3Packages.pyqt4 python3Packages.boost bison flex ]; diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index b0ba8508fc35..ace6c773770a 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -30,6 +30,8 @@ stdenv.mkDerivation rec { "-DLLVM_DIR=${llvm_11.dev}" "-DBUILD_SHARED_LIBS=YES" "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" + # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist diff --git a/pkgs/development/compilers/zig/default.nix b/pkgs/development/compilers/zig/default.nix index a2cd8f44ce28..fc8b60e9e3fb 100644 --- a/pkgs/development/compilers/zig/default.nix +++ b/pkgs/development/compilers/zig/default.nix @@ -38,6 +38,11 @@ stdenv.mkDerivation rec { export HOME=$TMPDIR; ''; + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + doCheck = true; checkPhase = '' runHook preCheck diff --git a/pkgs/development/embedded/xc3sprog/default.nix b/pkgs/development/embedded/xc3sprog/default.nix index b9785bac7c5c..ead48a004720 100644 --- a/pkgs/development/embedded/xc3sprog/default.nix +++ b/pkgs/development/embedded/xc3sprog/default.nix @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libusb-compat-0_1 libftdi ]; + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + meta = with lib; { description = "Command-line tools for programming FPGAs, microcontrollers and PROMs via JTAG"; homepage = "http://xc3sprog.sourceforge.net/"; diff --git a/pkgs/development/libraries/codec2/default.nix b/pkgs/development/libraries/codec2/default.nix index e360279c6a44..cc0ef008f82b 100644 --- a/pkgs/development/libraries/codec2/default.nix +++ b/pkgs/development/libraries/codec2/default.nix @@ -23,6 +23,11 @@ stdenv.mkDerivation rec { sed -r -i 's/(\<_Complex)(\s+)(float|double)/\3\2\1/' $out/include/$pname/freedv_api.h ''; + cmakeFlags = [ + # RPATH of binary /nix/store/.../bin/freedv_rx contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + meta = with lib; { description = "Speech codec designed for communications quality speech at low data rates"; homepage = "https://www.rowetel.com/codec2.html"; diff --git a/pkgs/development/libraries/ctpp2/default.nix b/pkgs/development/libraries/ctpp2/default.nix index 626606d0526d..c8bc708a2aa9 100644 --- a/pkgs/development/libraries/ctpp2/default.nix +++ b/pkgs/development/libraries/ctpp2/default.nix @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { sed -ie 's//\n#include /' src/CTPP2FileSourceLoader.cpp ''; + cmakeFlags = [ + # RPATH of binary /nix/store/.../bin/ctpp2json contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + doCheck = false; # fails meta = with lib; { diff --git a/pkgs/development/libraries/science/math/metis/default.nix b/pkgs/development/libraries/science/math/metis/default.nix index 41deec25d454..cd221e86b148 100644 --- a/pkgs/development/libraries/science/math/metis/default.nix +++ b/pkgs/development/libraries/science/math/metis/default.nix @@ -9,7 +9,11 @@ stdenv.mkDerivation rec { sha256 = "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"; }; - cmakeFlags = [ "-DGKLIB_PATH=../GKlib" ]; + cmakeFlags = [ + "-DGKLIB_PATH=../GKlib" + # remove once updated past https://github.com/KarypisLab/METIS/commit/521a2c360dc21ace5c4feb6dc0b7992433e3cb0f + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; nativeBuildInputs = [ unzip cmake ]; meta = { diff --git a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix index 8d8ae6e71e42..d8cb710b2936 100644 --- a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix +++ b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix @@ -30,6 +30,11 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/waifu2x-converter-cpp --prefix LD_LIBRARY_PATH : "${ocl-icd}/lib" ''; + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + meta = { description = "Improved fork of Waifu2X C++ using OpenCL and OpenCV"; homepage = "https://github.com/DeadSix27/waifu2x-converter-cpp";