racket: make lib paths consistent

authored by

rczb and committed by
Masum Reza
f8a7597f 1700b190

+7 -9
+7 -9
pkgs/by-name/ra/racket/package.nix
··· 26 26 let 27 27 minimal = racket-minimal.override { inherit disableDocs; }; 28 28 29 - makeLibPaths = lib.concatMapStringsSep " " ( 30 - lib.flip lib.pipe [ 31 - lib.getLib 32 - (x: ''"${x}/lib"'') 33 - ] 34 - ); 35 - 36 29 manifest = lib.importJSON ./manifest.json; 37 30 inherit (stdenv.hostPlatform) isDarwin; 38 31 in ··· 71 64 72 65 preBuild = 73 66 let 74 - libPaths = makeLibPaths finalAttrs.buildInputs; 75 67 libPathsVar = if isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH"; 76 68 in 77 69 /* ··· 79 71 dependencies, which is integrated into the build process of Racket 80 72 */ 81 73 '' 82 - for lib_path in ${libPaths}; do 74 + for lib_path in $( \ 75 + echo "$NIX_LDFLAGS" \ 76 + | tr ' ' '\n' \ 77 + | grep '^-L' \ 78 + | sed 's/^-L//' \ 79 + | awk '!seen[$0]++' \ 80 + ); do 83 81 addToSearchPath ${libPathsVar} $lib_path 84 82 done 85 83 ''