From eb0dcbcf13cebde91c44235dff765d94f12993de Mon Sep 17 00:00:00 2001 From: Madoura Date: Sat, 28 Jan 2023 12:45:32 -0600 Subject: [PATCH] rocfft: fix hydra workaround --- pkgs/development/libraries/rocfft/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/development/libraries/rocfft/default.nix b/pkgs/development/libraries/rocfft/default.nix index 375e6a7b432e..39d714ce84e8 100644 --- a/pkgs/development/libraries/rocfft/default.nix +++ b/pkgs/development/libraries/rocfft/default.nix @@ -135,6 +135,7 @@ in stdenv.mkDerivation { inherit (rocfft) pname version outputs src passthru meta; dontUnpack = true; + dontPatch = true; dontConfigure = true; dontBuild = true; @@ -155,4 +156,22 @@ in stdenv.mkDerivation { '' + '' runHook postInstall ''; + + # Fix paths + preFixup = '' + substituteInPlace $out/include/*.h $out/rocfft/include/*.h \ + --replace "${rocfft}" "$out" + + patchelf --set-rpath \ + $(patchelf --print-rpath $out/lib/librocfft.so | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $out/lib/librocfft.so + '' + lib.optionalString buildTests '' + patchelf --set-rpath \ + $(patchelf --print-rpath $test/bin/rocfft-test | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $test/bin/rocfft-test + '' + lib.optionalString buildBenchmarks '' + patchelf --set-rpath \ + $(patchelf --print-rpath $benchmark/bin/rocfft-rider | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $benchmark/bin/rocfft-rider + ''; }