diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2008-02-14 20:18:07 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2008-02-14 20:18:07 +0000 |
commit | d607e902afee834b9a68ca323f1ff11b5c4fd920 (patch) | |
tree | eadab6ea93409291ebf9e34b97c68fbb23fd7bf2 | |
parent | 80612bff712fb4e0ea866950990e4d61da0440b8 (diff) | |
download | nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar.gz nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar.bz2 nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar.lz nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar.xz nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.tar.zst nixlib-d607e902afee834b9a68ca323f1ff11b5c4fd920.zip |
Forward port: ccache, FF3b3
svn path=/nixpkgs/branches/stdenv-updates/; revision=10694
-rw-r--r-- | pkgs/applications/networking/browsers/firefox-3/binary.nix | 55 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/firefox-3/builder.sh | 30 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/firefox-3/default.nix | 64 | ||||
-rw-r--r-- | pkgs/development/tools/misc/ccache/default.nix | 15 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 13 |
5 files changed, 177 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/firefox-3/binary.nix b/pkgs/applications/networking/browsers/firefox-3/binary.nix new file mode 100644 index 000000000000..73e002435b88 --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox-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;}; +} + diff --git a/pkgs/applications/networking/browsers/firefox-3/builder.sh b/pkgs/applications/networking/browsers/firefox-3/builder.sh new file mode 100644 index 000000000000..66f1059d657f --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox-3/builder.sh @@ -0,0 +1,30 @@ +source $stdenv/setup + +postInstall=postInstall +postInstall() { + + # Strip some more stuff + strip -S $out/lib/*/* || true + + # This fixes starting Firefox when there already is a running + # instance. The `firefox' wrapper script actually expects to be + # in the same directory as `run-mozilla.sh', apparently. + libDir=$(cd $out/lib && ls -d firefox-*) + test -n "$libDir" + cd $out/bin + mv firefox ../lib/$libDir/ + ln -s ../lib/$libDir/firefox . + + # Register extensions etc. + echo "running firefox -register..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false + + echo "running regxpcom..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./regxpcom) || false + + # Put the Firefox icon in the right place. + ensureDir $out/lib/$libDir/chrome/icons/default + ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/ +} + +genericBuild diff --git a/pkgs/applications/networking/browsers/firefox-3/default.nix b/pkgs/applications/networking/browsers/firefox-3/default.nix new file mode 100644 index 000000000000..88315aa0c31b --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox-3/default.nix @@ -0,0 +1,64 @@ +args: with args; + +stdenv.mkDerivation { + name = "firefox-3.0-beta-3"; + + src = fetchurl { + url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b3/source/firefox-3.0b3-source.tar.bz2; + sha1 = "142f28a41077e77d61423a5ca6585a45737ff999"; + }; + + buildInputs = [ + pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo + python curl coreutils dbus dbus_glib pango freetype fontconfig + libX11 libXrender libXft libXt + ]; + + configureFlags = [ + "--enable-application=browser" + "--enable-optimize" + "--disable-debug" + "--enable-strip" + "--with-system-jpeg" + "--with-system-zlib" + #"--with-system-png" <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" + #"--enable-system-cairo" <-- disabled for now because Firefox needs a alpha version of Cairo + ]; + + 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/firefox \ + --replace /bin/pwd "$(type -tP pwd)" \ + --replace /bin/ls "$(type -tP ls)" + + # This fixes starting Firefox when there already is a running + # instance. The `firefox' wrapper script actually expects to be + # in the same directory as `run-mozilla.sh', apparently. + libDir=$(cd $out/lib && ls -d firefox-[0-9]*) + test -n "$libDir" + cd $out/bin + mv firefox ../lib/$libDir/ + ln -s ../lib/$libDir/firefox . + + # Register extensions etc. + echo "running firefox -register..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false + + # Put the Firefox icon in the right place. + ensureDir $out/lib/$libDir/chrome/icons/default + ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/ + ''; # */ + + meta = { + description = "Mozilla Firefox - the browser, reloaded"; + homepage = http://www.mozilla.com/en-US/firefox/; + }; + + passthru = {inherit gtk;}; +} + diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix new file mode 100644 index 000000000000..8342dfcc728d --- /dev/null +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "ccache-2.4"; + src = fetchurl { + url = http://samba.org/ftp/ccache/ccache-2.4.tar.gz; + sha256 = "435f862ca5168c346f5aa9e242174bbf19a5abcaeecfceeac2f194558827aaa0"; + }; + + meta = { + description = "ccache, a tool that caches compilation results."; + homepage = http://ccache.samba.org/; + license = "GPL"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47a78aff2ccd..b34b8f0bfe9d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1522,6 +1522,10 @@ rec { inherit fetchurl stdenv m4; }; + ccache = import ../development/tools/misc/ccache { + inherit fetchurl stdenv; + }; + ctags = import ../development/tools/misc/ctags { inherit fetchurl stdenv; }; @@ -4182,6 +4186,15 @@ rec { firefoxWrapper = wrapFirefox firefox ""; + firefox3 = lowPrio (import ../applications/networking/browsers/firefox-3 { + inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo + python curl coreutils dbus dbus_glib freetype fontconfig; + inherit (gtkLibs) gtk pango; + inherit (gnome) libIDL; + inherit (xlibs) libXi libX11 libXrender libXft libXt; + #enableOfficialBranding = true; + }); + firefox3b1 = lowPrio (import ../applications/networking/browsers/firefox3b1 { inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo python curl coreutils; |