remove gl from nix to check how linking fails
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -136,6 +136,7 @@
|
||||
gluonGraalvm
|
||||
pkgs.gradle_9
|
||||
pkgs.makeWrapper
|
||||
pkgs.patchelf
|
||||
pkgs.pkg-config
|
||||
];
|
||||
|
||||
@@ -223,6 +224,15 @@
|
||||
fi
|
||||
|
||||
cp "$binary" "$out/bin/jprototerm"
|
||||
currentRpath="$(patchelf --print-rpath "$out/bin/jprototerm" || true)"
|
||||
filteredRpath="$(printf '%s' "$currentRpath" | tr ':' '\n' | grep -v 'libglvnd' | paste -sd: -)"
|
||||
if [ -n "$filteredRpath" ]; then
|
||||
filteredRpath="$filteredRpath:/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/nvidia/current"
|
||||
else
|
||||
filteredRpath="/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/nvidia/current"
|
||||
fi
|
||||
patchelf --set-rpath "$filteredRpath" "$out/bin/jprototerm"
|
||||
|
||||
wrapProgram "$out/bin/jprototerm" \
|
||||
--run 'if [ -d /usr/lib/x86_64-linux-gnu/nvidia/current ]; then export __GLX_VENDOR_LIBRARY_NAME="''${__GLX_VENDOR_LIBRARY_NAME:-nvidia}"; fi' \
|
||||
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath runtimeLibs}" \
|
||||
|
||||
Reference in New Issue
Block a user