racket: make lib paths consistent

This commit is contained in:
rczb
2025-08-16 11:06:05 +08:00
committed by Masum Reza
parent 1700b1908b
commit f8a7597f5d
+7 -9
View File
@@ -26,13 +26,6 @@
let
minimal = racket-minimal.override { inherit disableDocs; };
makeLibPaths = lib.concatMapStringsSep " " (
lib.flip lib.pipe [
lib.getLib
(x: ''"${x}/lib"'')
]
);
manifest = lib.importJSON ./manifest.json;
inherit (stdenv.hostPlatform) isDarwin;
in
@@ -71,7 +64,6 @@ minimal.overrideAttrs (
preBuild =
let
libPaths = makeLibPaths finalAttrs.buildInputs;
libPathsVar = if isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
/*
@@ -79,7 +71,13 @@ minimal.overrideAttrs (
dependencies, which is integrated into the build process of Racket
*/
''
for lib_path in ${libPaths}; do
for lib_path in $( \
echo "$NIX_LDFLAGS" \
| tr ' ' '\n' \
| grep '^-L' \
| sed 's/^-L//' \
| awk '!seen[$0]++' \
); do
addToSearchPath ${libPathsVar} $lib_path
done
''