···33 # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
34 # any special hack.
35 preInstall = ''
36- if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then
37 mkdir -p $out/lib
38- cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
39 fi
40 '';
41
···33 # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
34 # any special hack.
35 preInstall = ''
36+ if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
37 mkdir -p $out/lib
38+ cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
39 fi
40 '';
41
···6364 # Patch it
65 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic"
66- patchelf --set-rpath "${stdenv.cc.gcc}/lib:${stdenv.cc.gcc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
6768 # Build the LD_PRELOAD library that makes Logic work from a read-only directory
69 mkdir -p "$out/lib"
···6364 # Patch it
65 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic"
66+ patchelf --set-rpath "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
6768 # Build the LD_PRELOAD library that makes Logic work from a read-only directory
69 mkdir -p "$out/lib"
···25 cp -r * $out/res
2627 patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \
28- --set-rpath ${stdenv.cc.gcc}/lib:${libX11}/lib:${mesa}/lib \
29 "$out/res/Tibia"
3031 # We've patchelf'd the files. The main ‘Tibia’ binary is a bit
···25 cp -r * $out/res
2627 patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \
28+ --set-rpath ${stdenv.cc.cc}/lib:${libX11}/lib:${mesa}/lib \
29 "$out/res/Tibia"
3031 # We've patchelf'd the files. The main ‘Tibia’ binary is a bit
···15 # The fpc is not properly wrapped to add -rpath. I add this manually.
16 # I even do a trick on lib/lib64 for libgcc, that I expect it will work.
17 preBuild = ''
18- export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.gcc}/lib64 -rpath ${stdenv.cc.gcc}/lib"
1920 sed -i 414,424d Makefile
21 '';
···15 # The fpc is not properly wrapped to add -rpath. I add this manually.
16 # I even do a trick on lib/lib64 for libgcc, that I expect it will work.
17 preBuild = ''
18+ export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc}/lib64 -rpath ${stdenv.cc.cc}/lib"
1920 sed -i 414,424d Makefile
21 '';
···8687 # This is needed because systemd uses the gold linker, which doesn't
88 # yet have the wrapper script to add rpath flags automatically.
89- NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.gcc}/lib";
9091 PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
92
···8687 # This is needed because systemd uses the gold linker, which doesn't
88 # yet have the wrapper script to add rpath flags automatically.
89+ NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.cc}/lib";
9091 PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
92