rocfft: fix hydra workaround

This commit is contained in:
Madoura 2023-01-28 12:45:32 -06:00
parent 2821a121dc
commit eb0dcbcf13
No known key found for this signature in database
GPG key ID: 3201136B3DB072F9

View file

@ -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
'';
}