fix opera on x86_64

svn path=/nixpkgs/trunk/; revision=17024
This commit is contained in:
Marc Weber 2009-09-10 16:57:45 +00:00
parent 2f91d73018
commit 7c02d7eb0b
2 changed files with 11 additions and 5 deletions

View File

@ -13,12 +13,16 @@ installPhase() {
[ -z ${system##*64*} ] && suf=64
for i in $out/lib/opera/*/opera $out/lib/opera/*/operaplugincleaner $out/lib/opera/*/operapluginwrapper $out/lib/opera/*/operapluginwrapper-native; do
echo "$i <<<<<<<<<<<<"
find $out -type f | while read f; do
echo testing "$f"
# patch all executables
if readelf -h "$f" | grep 'EXEC (Executable file)' &> /dev/null; then
echo "patching $f <<"
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$libPath" \
"$i"
"$f"
fi
done
# Substitute pwd as late as possible so that the md5 checksum check of opera passes.

View File

@ -26,8 +26,10 @@ stdenv.mkDerivation rec {
# `operapluginwrapper' requires libXt. Adding it makes startup faster
# and omits error messages (on x86).
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.gcc glibc qt zlib libX11 libXt libXext libSM libICE ];
libPath =
let list = [ stdenv.gcc.gcc glibc qt zlib libX11 libXt libXext libSM libICE];
in stdenv.lib.makeLibraryPath list
+ ":" + (if stdenv.system == "x86_64-linux" then stdenv.lib.makeSearchPath "lib64" list else []);
desktopItem = makeDesktopItem {
name = "Opera";