From 04767dfdd9f64988c3c955f420cc7250df8a64f5 Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Wed, 15 Feb 2006 02:53:01 +0000 Subject: [PATCH] * Added xulrunner 1.8.0.1 * Added a basic wrapper generator for xulrunner * Chatzilla running in xulrunner svn path=/nixpkgs/trunk/; revision=4809 --- .../networking/irc/chatzilla/builder.sh | 5 ++++ .../networking/irc/chatzilla/default.nix | 12 ++++++++ .../interpreters/xulrunner/builder.sh | 23 +++++++++++++++ .../interpreters/xulrunner/default.nix | 29 +++++++++++++++++++ .../interpreters/xulrunner/wrapper/builder.sh | 11 +++++++ .../xulrunner/wrapper/default.nix | 9 ++++++ pkgs/system/all-packages-generic.nix | 20 +++++++++++++ pkgs/system/populate-cache.nix | 2 ++ 8 files changed, 111 insertions(+) create mode 100755 pkgs/applications/networking/irc/chatzilla/builder.sh create mode 100644 pkgs/applications/networking/irc/chatzilla/default.nix create mode 100644 pkgs/development/interpreters/xulrunner/builder.sh create mode 100644 pkgs/development/interpreters/xulrunner/default.nix create mode 100644 pkgs/development/interpreters/xulrunner/wrapper/builder.sh create mode 100644 pkgs/development/interpreters/xulrunner/wrapper/default.nix diff --git a/pkgs/applications/networking/irc/chatzilla/builder.sh b/pkgs/applications/networking/irc/chatzilla/builder.sh new file mode 100755 index 000000000000..84c189a559bd --- /dev/null +++ b/pkgs/applications/networking/irc/chatzilla/builder.sh @@ -0,0 +1,5 @@ +source $stdenv/setup + +ensureDir $out +unzip $src -d $out + diff --git a/pkgs/applications/networking/irc/chatzilla/default.nix b/pkgs/applications/networking/irc/chatzilla/default.nix new file mode 100644 index 000000000000..644044cf2d62 --- /dev/null +++ b/pkgs/applications/networking/irc/chatzilla/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation { + name = "chatzilla-0.9.70"; + builder = ./builder.sh; + src = fetchurl { + url = http://rdmsoft.com/dlfs/cz/chatzilla-0.9.70-xr.zip; + md5 = "543ab121916b8c4bfe20d4aa07536e35"; + }; + + buildInputs = [unzip]; +} diff --git a/pkgs/development/interpreters/xulrunner/builder.sh b/pkgs/development/interpreters/xulrunner/builder.sh new file mode 100644 index 000000000000..8a7f01d3fe3c --- /dev/null +++ b/pkgs/development/interpreters/xulrunner/builder.sh @@ -0,0 +1,23 @@ +source $stdenv/setup + +postInstall=postInstall +postInstall() { + 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. + cd $out/bin + mv xulrunner ../lib/xulrunner-*/ + ln -s ../lib/xulrunner-*/xulrunner . + + echo "running xulrunner --register-global..." + $out/bin/xulrunner --register-global || true + + # xulrunner wants to create these directories at the first startup + cd $out + ensureDir ./lib/xulrunner-*/extensions + ensureDir ./lib/xulrunner-*/updates +} + +genericBuild diff --git a/pkgs/development/interpreters/xulrunner/default.nix b/pkgs/development/interpreters/xulrunner/default.nix new file mode 100644 index 000000000000..5f811133bde9 --- /dev/null +++ b/pkgs/development/interpreters/xulrunner/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL, libXi}: + +stdenv.mkDerivation { + name = "xulrunner-1.8.0.1"; + + builder = ./builder.sh; + src = fetchurl { + url = http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.1/source/xulrunner-1.8.0.1-source.tar.bz2; + md5 = "d60ccb6cc28afa7d880c8602a2c88450"; + }; + + buildInputs = [pkgconfig gtk perl zip libIDL libXi]; + configureFlags = [ + "--enable-application=xulrunner" + "--enable-optimize" + "--disable-debug" + "--enable-xft" + "--disable-freetype2" + "--enable-swg" + "--enable-strip" + "--enable-default-toolkit=gtk2" + "--with-system-jpeg" + "--with-system-png" + "--with-system-zlib" + "--disable-gnomevfs" + "--disable-gnomeui" + "--disable-javaxpcom" + ]; +} diff --git a/pkgs/development/interpreters/xulrunner/wrapper/builder.sh b/pkgs/development/interpreters/xulrunner/wrapper/builder.sh new file mode 100644 index 000000000000..30561cbf1823 --- /dev/null +++ b/pkgs/development/interpreters/xulrunner/wrapper/builder.sh @@ -0,0 +1,11 @@ +source $stdenv/setup + +ensureDir $out/bin + +wrapper="$out/bin/$launcher" + +echo "#! $SHELL -e" > $wrapper +echo "" >> $wrapper +echo "$xulrunner/bin/xulrunner $appfile \"\$@\"" >> $wrapper + +chmod +x $wrapper diff --git a/pkgs/development/interpreters/xulrunner/wrapper/default.nix b/pkgs/development/interpreters/xulrunner/wrapper/default.nix new file mode 100644 index 000000000000..e6d8ee6bbd5c --- /dev/null +++ b/pkgs/development/interpreters/xulrunner/wrapper/default.nix @@ -0,0 +1,9 @@ +{stdenv, xulrunner, application, launcher}: + +stdenv.mkDerivation { + name = application.name; + + builder = ./builder.sh; + inherit xulrunner launcher; + appfile = application ~ "application.ini"; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 8deaac6d0f48..0d7f88ec7a26 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -1842,6 +1842,18 @@ rec { inherit (xlibs) libXi; }; + xulrunner = (import ../development/interpreters/xulrunner) { + inherit fetchurl stdenv pkgconfig perl zip; + inherit (gtkLibs) gtk; + inherit (gnome) libIDL; + inherit (xlibs) libXi; + }; + + xulrunnerWrapper = {application, launcher}: + (import ../development/interpreters/xulrunner/wrapper) { + inherit stdenv xulrunner application launcher; + }; + wrapFirefox = firefox: (import ../applications/networking/browsers/firefox-wrapper) { inherit stdenv firefox; plugins = [ @@ -1905,6 +1917,14 @@ rec { inherit (gtkLibs) glib gtk; }; + chatzilla = + xulrunnerWrapper { + launcher = "chatzilla"; + application = (import ../applications/networking/irc/chatzilla) { + inherit fetchurl stdenv unzip; + }; + }; + rsync = (import ../applications/networking/sync/rsync) { inherit fetchurl stdenv; }; diff --git a/pkgs/system/populate-cache.nix b/pkgs/system/populate-cache.nix index 662c25fcaaff..405117dd83f3 100644 --- a/pkgs/system/populate-cache.nix +++ b/pkgs/system/populate-cache.nix @@ -21,6 +21,7 @@ let { bsdiff bzip2 callgrind + chatzilla cksfv coreutils darcs @@ -114,6 +115,7 @@ let { xmms xorg_sys_opengl xsel + xulrunner zapping zdelta zip