summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/icecat-3/binary.nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-07-28 15:55:11 +0000
committerLudovic Courtès <ludo@gnu.org>2008-07-28 15:55:11 +0000
commita898666dc497df6152c0c3b067b6fc0d88d85b01 (patch)
tree266d61592c1716d9ff5ce258024df4a9f6ac1f53 /pkgs/applications/networking/browsers/icecat-3/binary.nix
parentb0fb32ef3ca3c464a2ff21957e9e2a7c37d1d8df (diff)
Add GNU IceCat 3, GNU's free variant of Mozilla Firefox 3.
Currently, MPlayerPlugin can't be built with IceCat 3.

svn path=/nixpkgs/trunk/; revision=12437
Diffstat (limited to 'pkgs/applications/networking/browsers/icecat-3/binary.nix')
-rw-r--r--pkgs/applications/networking/browsers/icecat-3/binary.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/icecat-3/binary.nix b/pkgs/applications/networking/browsers/icecat-3/binary.nix
new file mode 100644
index 0000000000000..73e002435b889
--- /dev/null
+++ b/pkgs/applications/networking/browsers/icecat-3/binary.nix
@@ -0,0 +1,55 @@
+args: with args;
+
+assert stdenv.system == "i686-linux";
+
+stdenv.mkDerivation {
+  name = "firefox-3b1";
+
+  src = 
+	fetchurl {
+		url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b1/linux-i686/en-US/firefox-3.0b1.tar.bz2;
+		sha256 = "1cpcc5b07zdqyd5kiwhb4dqhy2mzbf97plsglcp6bc9054cmsylk";
+	};
+  buildInputs = [
+    pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo
+    python curl coreutils atk pango glib libX11 libXrender 
+    freetype fontconfig libXft libXt
+  ];
+
+  buildPhase = "
+    additionalRpath='';
+    for i in \$buildInputs ${stdenv.glibc} ${stdenv.gcc.gcc}; do 
+      additionalRpath=\$additionalRpath:\$i/lib;  
+    done
+    for i in firefox-bin ; do
+      oldrpath=$(patchelf --print-rpath \$i)
+      patchelf --set-rpath \$oldrpath\$additionalRpath \$i
+      patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 \$i
+    done
+  ";
+
+  installPhase = "
+    export dontPatchELF=1;
+    mkdir -p \$out
+    cp -r . \$out/firefox
+    mkdir -p \$out/bin
+    ln -s \$out/firefox/firefox \$out/bin/firefox
+
+    sed -e 's@moz_libdir=.*@moz_libdir='\$out'/firefox/@' -i \$out/bin/firefox 
+    sed -e 's@moz_libdir=.*@&\\nexport PATH=\$PATH:${coreutils}/bin@' -i \$out/bin/firefox 
+    sed -e 's@`/bin/pwd@`${coreutils}/bin/pwd@' -i \$out/bin/firefox 
+    sed -e 's@`/bin/ls@`${coreutils}/bin/ls@' -i \$out/bin/firefox 
+
+    strip -S \$out/firefox/*.so || true
+
+    echo \"running firefox -register...\"
+    \$out/firefox/firefox-bin -register || false
+  ";
+
+  meta = {
+    description = "Mozilla Firefox - the browser, reloaded";
+  };
+
+  passthru = {inherit gtk;};
+}
+