[Nix-dev] [PATCH] t/opera
Marc Weber
marco-oweber at gmx.de
Wed Jan 12 23:14:38 CET 2011
Opera update
Major change: Opera is based on X nowo ptionally using GTK, QT, KDE
toolkits for GUI.
GTK seems to work. QT starts (the open dialog does not
show icons). KDE does not start.
See comments to learn about how to choose one of those toolkits.
I can browse github again.
merged update provided by Kevin Quick
---
.../networking/browsers/opera/builder.sh | 19 +++-----
.../networking/browsers/opera/default.nix | 48 ++++++++++++++++----
pkgs/top-level/all-packages.nix | 4 +-
3 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/pkgs/applications/networking/browsers/opera/builder.sh b/pkgs/applications/networking/browsers/opera/builder.sh
index de4a413..dddcb5e 100644
--- a/pkgs/applications/networking/browsers/opera/builder.sh
+++ b/pkgs/applications/networking/browsers/opera/builder.sh
@@ -5,15 +5,9 @@ buildPhase() {
}
installPhase() {
- substituteInPlace install --replace /bin/pwd pwd
- substituteInPlace install --replace /usr/local "$out"
-
- # Note: the "no" is because the install scripts asks whether we
- # want to install icons in some system-wide directories.
-
- ensureDir "$out"
-
- ./install --text --system
+ ensureDir $out
+ sed -i "s@/usr/local@$out at g" install
+ ./install --unattended --system
[ -z ${system##*64*} ] && suf=64
@@ -28,10 +22,11 @@ installPhase() {
"$f"
fi
done
-
- # Substitute pwd as late as possible so that the md5 checksum check of opera passes.
- substituteInPlace $out/bin/opera --replace /bin/pwd pwd
+ # patchelf is not enough? Opera only finds libXcursor when usign
+ # LD_LIBRARY_PATH (seems to be optional though)
+ sed -i "2s@^@\\nexport LD_LIBRARY_PATH=$libPath@" $out/bin/opera
+
ensureDir $out/share/applications
cp $desktopItem/share/applications/* $out/share/applications
}
diff --git a/pkgs/applications/networking/browsers/opera/default.nix b/pkgs/applications/networking/browsers/opera/default.nix
index 8b7ef62..2c22320 100644
--- a/pkgs/applications/networking/browsers/opera/default.nix
+++ b/pkgs/applications/networking/browsers/opera/default.nix
@@ -1,24 +1,53 @@
-{ stdenv, fetchurl, qt, zlib, libX11, libXext, libSM, libICE, libXt, glibc
-, makeDesktopItem, freetype, fontconfig, libXft, libXrender
+{ stdenv, fetchurl, zlib, libX11, libXext, libXft, freetype, libSM, libICE,
+ libXt, libXrender, libXcursor, fontconfig, libuuid, glibc, libXi
+# qt gui:
+, qt47, kde4
+# gtk gui
+, gtkLibs, cairo
+
+, makeDesktopItem
+, # set of "gtk" "qt" "kde"
+ # kde does not work yet
+ # qt starts but icons are missing (?)
+ # so use gtk for now!
+ guiSupport ? [ "gtk" "qt" /* "kde" */ ]
}:
assert stdenv.isLinux && stdenv.gcc.gcc != null;
+
+let
+
+ libsForGuis = {
+ # Debug Dialog Toolkits with opera --full-version (see last line)
+ # See: http://www.opera.com/support/usingopera/operaini/
+ qt = [qt47 kde4.kdelibs]; # "Dialog Toolkit" = 1
+ gtk = with gtkLibs; [gtk glib atk pango cairo]; # "Dialog Toolkit" = 2
+ kde = []; # "Dialog Toolkit" = 3 (not supported by nixpkgs yet)
+ }; in
+
+
+/* TIp: enable unix like editing shortcuts:
+ Settings > Preferences > Advanced > Shortcuts
+*/
+
+
stdenv.mkDerivation rec {
- name = "opera-10.63";
+
+ name = "opera-11.00";
builder = ./builder.sh;
src =
if stdenv.system == "i686-linux" then
fetchurl {
- url = "http://mirror.liteserver.nl/pub/opera/linux/1063/opera-10.63-6450.i386.linux.tar.bz2";
- sha256 = "dd105d602a4b8897749a4cb9610f8bfe2d07d4f4cc9bf3905930c65592737259";
+ url = "http://get.opera.com/pub/opera/linux/1100/opera-11.00-1156.i386.linux.tar.bz2";
+ sha256 = "0rdzxnalf1djzm3bwv152fdqjrb20ka7li6y799ral7zyb9mw6lm";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
- url = "http://mirror.liteserver.nl/pub/opera/linux/1063/opera-10.63-6450.x86_64.linux.tar.bz2";
- sha256 = "da8ae14cf317364ab0295102220246b205bf30c59c00cadb571395c90dda7c74";
+ url = "http://get.opera.com/pub/opera/linux/1100/opera-11.00-1156.x86_64.linux.tar.bz2";
+ sha256 = "1j5isxral2frg9zcspcsbyfk6zijr8hz7gpydymwnfkhd59hbrj6";
}
else throw "Opera is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
@@ -27,8 +56,9 @@ stdenv.mkDerivation rec {
# `operapluginwrapper' requires libXt. Adding it makes startup faster
# and omits error messages (on x86).
libPath =
- let list = [ stdenv.gcc.gcc glibc qt zlib libX11 libXt libXext libSM libICE libXft freetype fontconfig
- libXrender];
+ let list = [ stdenv.gcc.gcc glibc zlib libX11 libXt libXext libSM libICE
+ libXft freetype fontconfig libXrender libXcursor libXi libuuid]
+ ++ (stdenv.lib.concatMap (x: builtins.getAttr x libsForGuis) guiSupport);
in stdenv.lib.makeLibraryPath list
+ ":" + (if stdenv.system == "x86_64-linux" then stdenv.lib.makeSearchPath "lib64" list else "");
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4f47ca7..6784360 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6364,9 +6364,7 @@ let
neon = neon029;
};
- opera = callPackage ../applications/networking/browsers/opera {
- qt = qt3;
- };
+ opera = callPackage ../applications/networking/browsers/opera { };
pan = callPackage ../applications/networking/newsreaders/pan {
gmime = gmime_2_2;
--
1.7.3.5
More information about the nix-dev
mailing list