From fd7a6cd6b5db04a8499c0489fbf4c95762fbbf1a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 3 Jul 2009 23:53:49 +0000 Subject: [PATCH] * Firefox 3.5. svn path=/nixpkgs/trunk/; revision=16172 --- .../networking/browsers/firefox/3.5.nix | 192 +++++++++++------- .../browsers/firefox/xulrunner-3.5.nix | 102 ---------- pkgs/top-level/all-packages.nix | 38 +--- 3 files changed, 131 insertions(+), 201 deletions(-) delete mode 100644 pkgs/applications/networking/browsers/firefox/xulrunner-3.5.nix diff --git a/pkgs/applications/networking/browsers/firefox/3.5.nix b/pkgs/applications/networking/browsers/firefox/3.5.nix index 09f2eabe541..6e544e47ca9 100644 --- a/pkgs/applications/networking/browsers/firefox/3.5.nix +++ b/pkgs/applications/networking/browsers/firefox/3.5.nix @@ -1,83 +1,139 @@ { stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL -, libjpeg, zlib, cairo, dbus, dbus_glib, bzip2 -, freetype, fontconfig, xulrunner, alsaLib, autoconf +, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs +, freetype, fontconfig, file, alsaLib , # If you want the resulting program to call itself "Firefox" instead # of "Deer Park", enable this option. However, those binaries may # not be distributed without permission from the Mozilla Foundation, # see http://www.mozilla.org/foundation/trademarks/. enableOfficialBranding ? false - }: -let version = xulrunner.ffversion; in +rec { -stdenv.mkDerivation { - name = "firefox-${version}"; + firefoxVersion = "3.5"; + + xulVersion = "1.9.1"; # this attribute is used by other packages - src = xulrunner.src; - - buildInputs = [ - pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 - python dbus dbus_glib pango freetype fontconfig alsaLib - autoconf - ]; - - propagatedBuildInputs = [xulrunner]; - - preConfigure = '' - export PREFIX=$out - export LIBXUL_DIST=$out - autoconf - cd js/src - autoconf - cd ../.. - ''; - - preBuild = '' - cd nsprpub - autoconf - ./configure - make - cd .. - ''; - - configureFlags = [ - "--enable-application=browser" - "--enable-optimize" - "--disable-debug" - "--enable-strip" - "--with-system-jpeg" - "--with-system-zlib" - "--with-system-bz2" - # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" - "--enable-system-cairo" - #"--enable-system-sqlite" # <-- this seems to be discouraged - "--disable-crashreporter" - "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}" - ]; - - postInstall = '' - # Strip some more stuff. - strip -S $out/lib/*/* || true - - libDir=$(cd $out/lib && ls -d firefox-[0-9]*) - test -n "$libDir" - - ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $out/lib/$libDir/xulrunner - - # Register extensions etc. !!! is this needed anymore? - echo "running firefox -register..." - $out/bin/firefox -register - ''; # */ - - meta = { - description = "Mozilla Firefox - the browser, reloaded"; - homepage = http://www.mozilla.com/en-US/firefox/; + + src = fetchurl { + url = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}-source.tar.bz2"; + sha1 = "acf223f2ba3b5e601f8832a3870a5d9034ac8d10"; }; - passthru = { - inherit gtk; - isFirefox3Like = true; + + commonConfigureFlags = + [ "--enable-optimize" + "--disable-debug" + "--enable-strip" + "--with-system-jpeg" + "--with-system-zlib" + "--with-system-bz2" + # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" + "--enable-system-cairo" + #"--enable-system-sqlite" # <-- this seems to be discouraged + "--disable-crashreporter" + ]; + + + xulrunner = stdenv.mkDerivation { + name = "xulrunner-${xulVersion}"; + + inherit src; + + buildInputs = + [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 + python dbus dbus_glib pango freetype fontconfig xlibs.libXi + xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file + alsaLib + ]; + + configureFlags = + [ "--enable-application=xulrunner" + "--disable-javaxpcom" + ] ++ commonConfigureFlags; + + # !!! Temporary hack. + preBuild = '' + export NIX_ENFORCE_PURITY= + ''; + + installFlags = "SKIP_GRE_REGISTRATION=1"; + + postInstall = '' + export dontPatchELF=1 + + make -C nsprpub install + + # Fix some references to /bin paths in the Xulrunner shell script. + substituteInPlace $out/bin/xulrunner \ + --replace /bin/pwd "$(type -tP pwd)" \ + --replace /bin/ls "$(type -tP ls)" + + # Fix run-mozilla.sh search + libDir=$(cd $out/lib && ls -d xulrunner-[0-9]*) + echo libDir: $libDir + test -n "$libDir" + cd $out/bin + mv xulrunner ../lib/$libDir/ + + for i in $out/lib/$libDir/*; do + file $i; + if file $i | grep executable &>/dev/null; then + ln -s $i $out/bin + fi; + done; + rm $out/bin/run-mozilla.sh || true + ''; # */ + + meta = { + description = "Mozilla Firefox XUL runner"; + homepage = http://www.mozilla.com/en-US/firefox/; + }; + + passthru = { inherit gtk; version = xulVersion; }; + }; + + + firefox = stdenv.mkDerivation rec { + name = "firefox-3.0.11"; + + inherit src; + + buildInputs = + [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python + dbus dbus_glib pango freetype fontconfig alsaLib + ]; + + propagatedBuildInputs = [xulrunner]; + + configureFlags = + [ "--enable-application=browser" + "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}" + "--with-system-nspr" + ] + ++ commonConfigureFlags + ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; + + postInstall = '' + libDir=$(cd $out/lib && ls -d firefox-[0-9]*) + test -n "$libDir" + + ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $out/lib/$libDir/xulrunner + + # Register extensions etc. !!! is this needed anymore? + echo "running firefox -register..." + $out/bin/firefox -register + ''; # */ + + meta = { + description = "Mozilla Firefox - the browser, reloaded"; + homepage = http://www.mozilla.com/en-US/firefox/; + }; + + passthru = { + inherit gtk; + isFirefox3Like = true; + }; }; } diff --git a/pkgs/applications/networking/browsers/firefox/xulrunner-3.5.nix b/pkgs/applications/networking/browsers/firefox/xulrunner-3.5.nix deleted file mode 100644 index d21451a66ea..00000000000 --- a/pkgs/applications/networking/browsers/firefox/xulrunner-3.5.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL -, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs -, freetype, fontconfig, file, alsaLib, autoconf - -, # If you want the resulting program to call itself "Firefox" instead - # of "Deer Park", enable this option. However, those binaries may - # not be distributed without permission from the Mozilla Foundation, - # see http://www.mozilla.org/foundation/trademarks/. - enableOfficialBranding ? false -}: - -let - - version = "1.9.1rc1"; - shownVersion = "1.9.1"; # this attribute is used by other packages - # _usually_ it is the same as version - ffversion = "3.5rc1"; - -in - -stdenv.mkDerivation rec { - name = "xulrunner-${version}"; - - src = fetchurl { - url = "ftp://ftp.mozilla.org/pub/firefox/releases/${ffversion}/source/firefox-${ffversion}-source.tar.bz2"; - sha256 = "14yrkvk0kibfpkcvbb44ww89plhm8iikbqmnc0jbkjr4k70a7gcl"; - }; - - buildInputs = [ - pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 - python dbus dbus_glib pango freetype fontconfig - xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt - file alsaLib autoconf - ]; - - preConfigure = '' - export PREFIX=$out - export LIBXUL_DIST=$out - autoconf - cd js/src - autoconf - cd ../.. - ''; - - configureFlags = [ - "--enable-application=xulrunner" - "--disable-javaxpcom" - "--enable-optimize" - "--disable-debug" - "--enable-strip" - "--with-system-jpeg" - "--with-system-zlib" - "--with-system-bz2" - # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" - "--enable-system-cairo" - #"--enable-system-sqlite" # <-- this seems to be discouraged - "--disable-crashreporter" - ]; - - installFlags = [ - "SKIP_GRE_REGISTRATION=1" - ]; - - postInstall = '' - export dontPatchELF=1; - - # Strip some more stuff - strip -S $out/lib/*/* || true - - # Fix some references to /bin paths in the Firefox shell script. - substituteInPlace $out/bin/xulrunner \ - --replace /bin/pwd "$(type -tP pwd)" \ - --replace /bin/ls "$(type -tP ls)" - - # Fix run-mozilla.sh search - libDir=$(cd $out/lib && ls -d xulrunner-[0-9]*) - echo libDir: $libDir - test -n "$libDir" - cd $out/bin - mv xulrunner ../lib/$libDir/ - - for i in $out/lib/$libDir/*; do - file $i; - if file $i | grep executable &>/dev/null; then - ln -s $i $out/bin - fi; - done; - rm $out/bin/run-mozilla.sh || true - ''; # */ - - meta = { - description = "Mozilla Firefox XUL runner"; - homepage = http://www.mozilla.com/en-US/firefox/; - }; - - passthru = { - inherit gtk ffversion src; - version = shownVersion; - }; -} - - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1540b27f69c..ee331ad1330 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6283,42 +6283,18 @@ let python dbus dbus_glib freetype fontconfig bzip2 xlibs file; inherit (gtkLibs) gtk pango; inherit (gnome) libIDL; - #enableOfficialBranding = true; }); firefox3 = firefox3Pkgs.firefox; - xulrunner3 = firefox3Pkgs.xulrunner; - - firefox3_5 = lowPrio (import ../applications/networking/browsers/firefox/3.5.nix { - inherit fetchurl stdenv pkgconfig perl zip libjpeg zlib cairo - python dbus dbus_glib freetype fontconfig bzip2; - inherit (gtkLibs) gtk pango; - inherit (gnome) libIDL; - inherit alsaLib; - xulrunner = xulrunner3_5; - autoconf = autoconf213; - }); - - xulrunner3_5 = lowPrio (import ../applications/networking/browsers/firefox/xulrunner-3.5.nix { - inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo - python dbus dbus_glib freetype fontconfig bzip2 xlibs file; - inherit (gtkLibs) gtk pango; - inherit (gnome) libIDL; - inherit alsaLib; - autoconf = autoconf213; - }); - - firefox3b1Bin = lowPrio (import ../applications/networking/browsers/firefox/binary.nix { - inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo - python curl coreutils freetype fontconfig; - inherit (gtkLibs) gtk atk pango glib; - inherit (gnome) libIDL; - inherit (xlibs) libXi libX11 libXrender libXft libXt; - }); - firefox3Wrapper = wrapFirefox firefox3 "firefox" ""; - firefox3b1BinWrapper = lowPrio (wrapFirefox firefox3b1Bin "firefox" ""); + + firefox35Pkgs = lowPrio (import ../applications/networking/browsers/firefox/3.5.nix { + inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo + python dbus dbus_glib freetype fontconfig bzip2 xlibs file alsaLib; + inherit (gtkLibs) gtk pango; + inherit (gnome) libIDL; + }); flac = import ../applications/audio/flac { inherit fetchurl stdenv libogg;