From c0588c0bb73e7a9781cca1783eef8e2899ea94af Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 18 Feb 2008 20:53:47 +0000 Subject: [PATCH 01/10] libjingle added: 0.3.11 (tapioca version) compiles, 0.4 (vanilla Google) doesn't. svn path=/nixpkgs/branches/stdenv-updates/; revision=10750 --- pkgs/development/libraries/libjingle/0.3.11.nix | 10 ++++++++++ pkgs/development/libraries/libjingle/0.4.0.nix | 10 ++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/libjingle/0.3.11.nix create mode 100644 pkgs/development/libraries/libjingle/0.4.0.nix diff --git a/pkgs/development/libraries/libjingle/0.3.11.nix b/pkgs/development/libraries/libjingle/0.3.11.nix new file mode 100644 index 00000000000..b9d0b82df5e --- /dev/null +++ b/pkgs/development/libraries/libjingle/0.3.11.nix @@ -0,0 +1,10 @@ +args: with args; +stdenv.mkDerivation rec { + name = "libjingle-" + version; + src = fetchurl { + url = "mirror://sf/tapioca-voip/${name}.tar.gz"; + sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj"; + }; + + propagatedBuildInputs = [ mediastreamer ]; +} diff --git a/pkgs/development/libraries/libjingle/0.4.0.nix b/pkgs/development/libraries/libjingle/0.4.0.nix new file mode 100644 index 00000000000..93bacd00929 --- /dev/null +++ b/pkgs/development/libraries/libjingle/0.4.0.nix @@ -0,0 +1,10 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "libjingle-" + version; + + src = fetchurl { + url = "mirror://sf/libjingle/${name}.tar.gz"; + sha256 = "0izg1i4nmhysvkqmsl2xqp0x6lwz2jjyavvhv196hsdsr2w0iwvi"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index acac3d50853..7987cbf46fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2278,6 +2278,10 @@ rec { inherit fetchurl stdenv pkgconfig libraw1394; }; + libjingle = selectVersion ../development/libraries/libjingle "0.3.11" { + inherit fetchurl stdenv mediastreamer; + }; + libjpeg = import ../development/libraries/libjpeg { inherit fetchurl stdenv libtool; }; From 8aaa56370988a250c23a8a2993106ab7dbf5636f Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 18 Feb 2008 20:53:57 +0000 Subject: [PATCH 02/10] Result link was accidentially added. Removing svn path=/nixpkgs/branches/stdenv-updates/; revision=10751 --- pkgs/development/libraries/libeXosip2/result | 1 - 1 file changed, 1 deletion(-) delete mode 120000 pkgs/development/libraries/libeXosip2/result diff --git a/pkgs/development/libraries/libeXosip2/result b/pkgs/development/libraries/libeXosip2/result deleted file mode 120000 index efa7575ab3a..00000000000 --- a/pkgs/development/libraries/libeXosip2/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/kc4kxnsi33x8a5p9xa3kv6w7dhj52w2f-libeXosip2-3.0.3 \ No newline at end of file From ab3fc34bcea1d5c732436f8329e0cc72bd3371c2 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 18 Feb 2008 20:54:08 +0000 Subject: [PATCH 03/10] mysql: +libmysqld, +openssl svn path=/nixpkgs/branches/stdenv-updates/; revision=10752 --- pkgs/servers/sql/mysql5/default.nix | 7 ++++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/sql/mysql5/default.nix b/pkgs/servers/sql/mysql5/default.nix index d76a81184d2..89107d10864 100644 --- a/pkgs/servers/sql/mysql5/default.nix +++ b/pkgs/servers/sql/mysql5/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ps, ncurses, zlib ? null, perl}: +args: with args; # Note: zlib is not required; MySQL can use an internal zlib. @@ -10,7 +10,8 @@ stdenv.mkDerivation { sha256 = "e4443d8dc859ed53bd9f3bef143ce30c7f5dee66a02748e9a003136be25e0060"; }; - buildInputs = [ps ncurses zlib perl]; + buildInputs = [ps ncurses zlib perl openssl]; + postInstall = "ln -s mysqld_safe $out/bin/mysqld"; - configureFlags = "--enable-thread-safe-client"; + configureFlags = "--enable-thread-safe-client --with-embedded-server --disable-static --with-openssl=${openssl} --with-berkeley-db"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7987cbf46fc..644fab02a8a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3240,7 +3240,7 @@ rec { }; mysql = import ../servers/sql/mysql5 { - inherit fetchurl stdenv ncurses zlib perl; + inherit fetchurl stdenv ncurses zlib perl openssl; ps = procps; /* !!! Linux only */ }; From bcffa9bb34ae7b1678fe0ef278b33f7bfaae41f1 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 18 Feb 2008 20:54:39 +0000 Subject: [PATCH 04/10] kde-4.0.1 svn path=/nixpkgs/branches/stdenv-updates/; revision=10753 --- pkgs/desktops/kde-4/base/default.nix | 10 ++-- pkgs/desktops/kde-4/decibel/default.nix | 15 ++++-- pkgs/desktops/kde-4/default.nix | 37 +++++++------ pkgs/desktops/kde-4/edu/default.nix | 10 ++-- pkgs/desktops/kde-4/extragear/default.nix | 15 +++--- pkgs/desktops/kde-4/games/default.nix | 10 ++-- pkgs/desktops/kde-4/graphics/default.nix | 12 ++--- pkgs/desktops/kde-4/libs/default.nix | 57 +++++++++++++++++---- pkgs/desktops/kde-4/multimedia/default.nix | 10 ++-- pkgs/desktops/kde-4/network/default.nix | 13 +++-- pkgs/desktops/kde-4/pim/default.nix | 19 ++++--- pkgs/desktops/kde-4/pimlibs/default.nix | 8 +-- pkgs/desktops/kde-4/runtime/default.nix | 11 ++-- pkgs/desktops/kde-4/support/akode.nix | 2 +- pkgs/desktops/kde-4/support/default.nix | 2 +- pkgs/desktops/kde-4/support/eigen.nix | 2 +- pkgs/desktops/kde-4/support/gmm.nix | 2 +- pkgs/desktops/kde-4/support/qca.nix | 2 +- pkgs/desktops/kde-4/support/qimageblitz.nix | 2 +- pkgs/desktops/kde-4/support/soprano.nix | 2 +- pkgs/desktops/kde-4/support/strigi.nix | 5 +- pkgs/desktops/kde-4/support/taglib.nix | 2 +- pkgs/desktops/kde-4/toys/default.nix | 10 ++-- pkgs/desktops/kde-4/utils/default.nix | 10 ++-- pkgs/desktops/kde-4/workspace/default.nix | 12 ++--- pkgs/top-level/all-packages.nix | 11 ++-- 26 files changed, 169 insertions(+), 122 deletions(-) diff --git a/pkgs/desktops/kde-4/base/default.nix b/pkgs/desktops/kde-4/base/default.nix index f6a2ca1d92b..5dd7f6bb021 100644 --- a/pkgs/desktops/kde-4/base/default.nix +++ b/pkgs/desktops/kde-4/base/default.nix @@ -1,13 +1,13 @@ args: with args; -stdenv.mkDerivation { - name = "kdebase-4.0.0"; +stdenv.mkDerivation rec { + name = "kdebase-" + version; src = fetchurl { - url = mirror://kde/stable/4.0.0/src/kdebase-4.0.0.tar.bz2; - sha256 = "1419zijcrx6nk10nay3dbv0vi8525hzcqkm2fw8cvw11i4mk909q"; + url = "mirror://kde/stable/${version}/src/${name}.tar.bz2"; + sha256 = "1cdswhavhk6wjdxwpsmmvq1qqw2a5mdyvvxk9fnxn9fnic7q0603"; }; - propagatedBuildInputs = [kdepimlibs libusb]; + propagatedBuildInputs = [kde4.pimlibs kde4.support.qimageblitz libusb]; buildInputs = [cmake]; } diff --git a/pkgs/desktops/kde-4/decibel/default.nix b/pkgs/desktops/kde-4/decibel/default.nix index ff98b48ee6f..3025e296881 100644 --- a/pkgs/desktops/kde-4/decibel/default.nix +++ b/pkgs/desktops/kde-4/decibel/default.nix @@ -1,11 +1,16 @@ args: with args; +let + rev = "773861"; +in stdenv.mkDerivation { - name = "decibel-0.5.0"; + name = "decibel-r${rev}"; - src = fetchurl { - url = http://decibel.kde.org/fileadmin/downloads/decibel/releases/decibel-0.5.0.tar.gz; - sha256 = "07visasid4mpzm0ba5j9qy0lxxb6451lvbr2gnc1vzfvjagffqz4"; + src = fetchsvn { + url = svn://anonsvn.kde.org/home/kde/trunk/playground/pim/decibel; + sha256 = "073fksn5dl7vkkiwvl9s56n9ymnlxy27kbz1h1fryq6r8x924vjc"; + inherit rev; }; - buildInputs = [kdelibs kdebase ]; + propagatedBuildInputs = [ kde4.libs tapioca_qt ]; + buildInputs = [cmake]; } diff --git a/pkgs/desktops/kde-4/default.nix b/pkgs/desktops/kde-4/default.nix index 11554c9955e..43e85fc08d6 100644 --- a/pkgs/desktops/kde-4/default.nix +++ b/pkgs/desktops/kde-4/default.nix @@ -1,24 +1,27 @@ -args: +origArgs: +let + args = origArgs // { version = "4.0.1"; }; +in rec { fullargs = args // { kdelibs = libs; kdepimlibs = pimlibs; kdebase = base; kderuntime = runtime; }; - libs = import ./libs (args // { kdesupport = support; }); + libs = import ./libs args; l10n = import ./l10n (args // {kdelibs = libs;}); - pimlibs = import ./pimlibs (args // { kdelibs = libs; }); - graphics = import ./graphics (fullargs // { kdeworkspace = workspace; } ); - multimedia = import ./multimedia (fullargs // { kdeworkspace = workspace; } ); - toys = import ./toys (fullargs // { kdeworkspace = workspace; } ); - network = import ./network (fullargs // { kdeworkspace = workspace; } ); - utils = import ./utils (fullargs // { kdeworkspace = workspace; } ); - games = import ./games (fullargs // { kdeworkspace = workspace; } ); - edu = import ./edu (fullargs // { kdeworkspace = workspace; } ); - base = import ./base fullargs; - runtime = import ./runtime fullargs; - workspace = import ./workspace fullargs; - extragear_plasma = import ./extragear (fullargs // { kdeworkspace = workspace; }); + pimlibs = import ./pimlibs args; + graphics = import ./graphics args; + multimedia = import ./multimedia args; + toys = import ./toys args; + network = import ./network args; + utils = import ./utils args; + games = import ./games args; + edu = import ./edu args; + base = import ./base args; + runtime = import ./runtime args; + workspace = import ./workspace args; + extragear_plasma = import ./extragear args; support = import ./support args; - decibel = import ./decibel fullargs; -# kdepim is not included in KDE-4.0.0 - #pim = import ./pim (fullargs // {kdeworkspace = workspace; }); + decibel = import ./decibel args; +# kdepim is not included in KDE-4.0.1, building from svn + pim = import ./pim args; env = kde_pkgs: with args; [ (runCommand "kde-env" { diff --git a/pkgs/desktops/kde-4/edu/default.nix b/pkgs/desktops/kde-4/edu/default.nix index 7f9648c6f8f..cd1d6353fbf 100644 --- a/pkgs/desktops/kde-4/edu/default.nix +++ b/pkgs/desktops/kde-4/edu/default.nix @@ -1,15 +1,15 @@ args: with args; stdenv.mkDerivation rec { - name = "kdeedu-4.0.0"; + name = "kdeedu-" + version; src = fetchurl { - url = mirror://kde/stable/4.0.0/src/kdeedu-4.0.0.tar.bz2; - sha256 = "1wjy1rm7aiib1lv61wx7mcbkbpkk6phcz1q6dy51x0hfrc3rdkg4"; + url = "mirror://kde/stable/${version}/src/${name}.tar.bz2"; + sha256 = "1j0swj38qdx0azm2dnx4l7if5dxak1pmcr90ynfjrcifkm68mm3k"; }; - propagatedBuildInputs = [kdepimlibs boost readline openbabel ocaml libusb - facile python indilib libnova]; + propagatedBuildInputs = [kde4.pimlibs boost readline openbabel ocaml libusb + facile python indilib libnova kde4.support.eigen]; buildInputs = [cmake]; myCmakeFiles = ./myCmakeFiles; patchPhase = " diff --git a/pkgs/desktops/kde-4/extragear/default.nix b/pkgs/desktops/kde-4/extragear/default.nix index 8ad2ef0540f..25c1bce91b5 100644 --- a/pkgs/desktops/kde-4/extragear/default.nix +++ b/pkgs/desktops/kde-4/extragear/default.nix @@ -1,17 +1,16 @@ args: with args; -stdenv.mkDerivation { - name = "extragear-plasma-4.0.0"; +stdenv.mkDerivation rec { + name = "extragear-plasma-" + version; src = fetchurl { - url = mirror://kde/stable/4.0.0/src/extragear/extragear-plasma-4.0.0.tar.bz2; - sha256 = "19gmvqkal11gg67gfmdivxbhwvggm2i6ad642984d97yicms7s9k"; + url = "mirror://kde/stable/${version}/src/extragear/${name}.tar.bz2"; + sha256 = "1pwvsmdb4z9av6bqh1yk23wgss1wc07rwq47gyxvvi54idpgirx9"; }; - buildInputs = [ kdeworkspace cmake ]; + buildInputs = [ kde4.workspace cmake ]; patchPhase = '' - sed -e 's@ Date: Wed, 20 Feb 2008 15:16:48 +0000 Subject: [PATCH 05/10] * buildPhase: skip if there is no Makefile (just like configurePhase is skipped when there is no configure script). So you don't need to set buildPhase = "true"; for derivations that don't have any build action. * Variable $makefile to allow the makefile to be specified. svn path=/nixpkgs/branches/stdenv-updates/; revision=10784 --- pkgs/stdenv/generic/setup.sh | 45 ++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 4f40c3ee562..a6dc302cc6d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1,8 +1,4 @@ -set -e - -test -z $NIX_GCC && NIX_GCC=@gcc@ - - +###################################################################### # Helper functions that might be useful in setup hooks. @@ -27,6 +23,14 @@ addToSearchPath() } +###################################################################### +# Initialisation. + +set -e + +test -z $NIX_GCC && NIX_GCC=@gcc@ + + # Set up the initial path. PATH= for i in $NIX_GCC @initialPath@; do @@ -34,7 +38,7 @@ for i in $NIX_GCC @initialPath@; do done if test "$NIX_DEBUG" = "1"; then - echo "Initial path: $PATH" + echo "initial path: $PATH" fi @@ -213,7 +217,7 @@ fi PATH=$_PATH${_PATH:+:}$PATH if test "$NIX_DEBUG" = "1"; then - echo "Final path: $PATH" + echo "final path: $PATH" fi stripDirs() { @@ -640,8 +644,13 @@ buildW() { eval "$preBuild" + if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile"; then + echo "no Makefile or makefile, doing nothing" + return + fi + echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" - make \ + make ${makefile:+-f $makefile} \ $makeFlags "${makeFlagsArray[@]}" \ $buildFlags "${buildFlagsArray[@]}" || fail @@ -672,7 +681,7 @@ checkW() { fi echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" - make \ + make ${makefile:+-f $makefile} \ $makeFlags "${makeFlagsArray[@]}" \ $checkFlags "${checkFlagsArray[@]}" $checkTarget || fail } @@ -716,7 +725,7 @@ installW() { installTargets=install fi echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" - make $installTargets \ + make ${makefile:+-f $makefile} $installTargets \ $makeFlags "${makeFlagsArray[@]}" \ $installFlags "${installFlagsArray[@]}" || fail else @@ -756,9 +765,9 @@ fixupW() { for d in $forceShare; do if test -d "$prefix/$d"; then if test -d "$prefix/share/$d"; then - echo "Both $d/ and share/$d/ exists!" + echo "both $d/ and share/$d/ exists!" else - echo Fixing location of $d/ subdirectory + echo "fixing location of $d/ subdirectory" ensureDir $prefix/share if test -w $prefix/share; then mv -v $prefix/$d $prefix/share @@ -771,10 +780,12 @@ fixupW() { # TODO: strip _only_ ELF executables, and return || fail here... if test -z "$dontStrip"; then - echo "Stripping debuging symbols from files in" - stripDirs "${stripDebugList:-lib}" -S - echo "Stripping all symbols from files in" - stripDirs "${stripAllList:-bin sbin}" -s + stripDebugList=${stripDebugList:-lib} + echo "stripping debuging symbols from files in $stripDebugList" + stripDirs "$stripDebugList" -S + stripAllList=${stripAllList:-bin sbin} + echo "stripping all symbols from files in $stripAllList" + stripDirs "$stripAllList" -s fi if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then @@ -820,7 +831,7 @@ distW() { fi echo "dist flags: $distFlags ${distFlagsArray[@]}" - make $distFlags "${distFlagsArray[@]}" $distTarget || fail + make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" $distTarget || fail if test "$dontCopyDist" != 1; then ensureDir "$out/tarballs" From 39c3cd425900990f6ff7d8290e8030ae240c5c1d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Feb 2008 17:10:36 +0000 Subject: [PATCH 06/10] * Get rid of all the phase wrapper functions, just do that generically in genericBuild. This also means that you can override a phase function by redefining it, like buildPhase() { ... do something ... } and you still get the log nesting stuff. * GNUmakefile is also a valid makefile name. * Evaluate the variables $preHook and $postHook to allow more stdenv overrideability. svn path=/nixpkgs/branches/stdenv-updates/; revision=10786 --- pkgs/stdenv/generic/setup.sh | 169 ++++++++++++----------------------- 1 file changed, 59 insertions(+), 110 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index a6dc302cc6d..395de988e4c 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -53,9 +53,8 @@ param2=@param2@ param3=@param3@ param4=@param4@ param5=@param5@ -if test -n "@preHook@"; then - source @preHook@ -fi +if test -n "@preHook@"; then source @preHook@; fi +eval "$preHook" # Check that the pre-hook initialised SHELL. @@ -210,16 +209,16 @@ if test "$useTempPrefix" = "1"; then fi -# Execute the post-hook. -if test -n "@postHook@"; then - source @postHook@ -fi - PATH=$_PATH${_PATH:+:}$PATH if test "$NIX_DEBUG" = "1"; then echo "final path: $PATH" fi + +###################################################################### +# Misc. helper functions. + + stripDirs() { local dirs="$1" local stripFlags="$2" @@ -423,12 +422,12 @@ stripHash() { unpackFile() { - local file=$1 + local file="$1" local cmd header "unpacking source archive $file" 3 - case $file in + case "$file" in *.tar) tar xvf $file || fail ;; @@ -462,7 +461,7 @@ unpackFile() { } -unpackW() { +unpackPhase() { if test -n "$unpackPhase"; then eval "$unpackPhase" return @@ -532,23 +531,14 @@ unpackW() { } -unpackPhase() { - sourceRoot=. # don't change to user dir homeless shelter if custom unpackSource doesn't set sourceRoot - header "unpacking sources" - startLog "unpack" - unpackW - stopLog - stopNest - cd $sourceRoot -} - - -patchW() { +patchPhase() { if test -n "$patchPhase"; then eval "$patchPhase" return fi + if test -z "$patchPhase" -a -z "$patches"; then return; fi + if test -z "$patchFlags"; then patchFlags="-p1" fi @@ -570,23 +560,13 @@ patchW() { } -patchPhase() { - if test -z "$patchPhase" -a -z "$patches"; then return; fi - header "patching sources" - startLog "patch" - patchW - stopLog - stopNest -} - - fixLibtool() { sed 's^eval sys_lib_.*search_path=.*^^' < $1 > $1.tmp mv $1.tmp $1 } -configureW() { +configurePhase() { if test -n "$configurePhase"; then eval "$configurePhase" return @@ -627,16 +607,7 @@ configureW() { } -configurePhase() { - header "configuring" - startLog "configure" - configureW - stopLog - stopNest -} - - -buildW() { +buildPhase() { if test -n "$buildPhase"; then eval "$buildPhase" return @@ -644,8 +615,8 @@ buildW() { eval "$preBuild" - if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile"; then - echo "no Makefile or makefile, doing nothing" + if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then + echo "no Makefile, doing nothing" return fi @@ -658,19 +629,7 @@ buildW() { } -buildPhase() { - if test "$dontBuild" = 1; then - return - fi - header "building" - startLog "build" - buildW - stopLog - stopNest -} - - -checkW() { +checkPhase() { if test -n "$checkPhase"; then eval "$checkPhase" return @@ -687,18 +646,6 @@ checkW() { } -checkPhase() { - if test "$doCheck" != 1; then - return - fi - header "checking" - startLog "check" - checkW - stopLog - stopNest -} - - patchELF() { # Patch all ELF executables and shared libraries. header "patching ELF executables and libraries" @@ -710,7 +657,7 @@ patchELF() { } -installW() { +installPhase() { if test -n "$installPhase"; then eval "$installPhase" return @@ -736,22 +683,10 @@ installW() { } -installPhase() { - if test "$dontInstall" = 1; then - return - fi - header "installing" - startLog "install" - installW - stopLog - stopNest -} - - # The fixup phase performs generic, package-independent, Nix-related # stuff, like running patchelf and setting the # propagated-build-inputs. It should rarely be overriden. -fixupW() { +fixupPhase() { if test -n "$fixupPhase"; then eval "$fixupPhase" return @@ -806,19 +741,7 @@ fixupW() { } -fixupPhase() { - if test "$dontFixup" = 1; then - return - fi - header "post-installation fixup" - startLog "fixup" - fixupW - stopLog - stopNest -} - - -distW() { +distPhase() { if test -n "$distPhase"; then eval "$distPhase" return @@ -849,15 +772,18 @@ distW() { } -distPhase() { - if test "$doDist" != 1; then - return - fi - header "creating distribution" - startLog "dist" - distW - stopLog - stopNest +showPhaseHeader() { + local phase="$1" + case $phase in + unpackPhase) header "unpacking sources";; + patchPhase) header "patching sources";; + configurePhase) header "configuring";; + buildPhase) header "building";; + checkPhase) header "running tests";; + installPhase) header "installing";; + fixupPhase) header "post-installation fixup";; + *) header "$phase";; + esac } @@ -871,16 +797,39 @@ genericBuild() { if test -z "$phases"; then phases="unpackPhase patchPhase configurePhase buildPhase checkPhase \ - installPhase fixupPhase distPhase"; + installPhase fixupPhase distPhase $extraPhases"; fi - for i in $phases; do + for curPhase in $phases; do + if test "$curPhase" = buildPhase -a -n "$dontBuild"; then continue; fi + if test "$curPhase" = checkPhase -a -z "$doCheck"; then continue; fi + if test "$curPhase" = installPhase -a -n "$dontInstall"; then continue; fi + if test "$curPhase" = fixupPhase -a -n "$dontFixup"; then continue; fi + if test "$curPhase" = distPhase -a -z "$doDist"; then continue; fi + + showPhaseHeader "$curPhase" + startLog "$curPhase" dumpVars - eval "$i" + + # Evaluate the variable named $curPhase if it exists, otherwise the + # function named $curPhase. + eval "${!curPhase:-$curPhase}" + + if test "$curPhase" = unpackPhase; then + cd "${sourceRoot:-.}" + fi + + stopLog + stopNest done stopNest } +# Execute the post-hook. +if test -n "@postHook@"; then source @postHook@; fi +eval "$postHook" + + dumpVars From 10f7a2614a859c39f3194003cd68aa07eace8571 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Feb 2008 17:13:06 +0000 Subject: [PATCH 07/10] * Make the "Entering directory ..." message appear *before* "building blah". svn path=/nixpkgs/branches/stdenv-updates/; revision=10787 --- .../tools/build-managers/gnumake/log.patch | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/development/tools/build-managers/gnumake/log.patch b/pkgs/development/tools/build-managers/gnumake/log.patch index 99111ca3495..3104e1f2bde 100644 --- a/pkgs/development/tools/build-managers/gnumake/log.patch +++ b/pkgs/development/tools/build-managers/gnumake/log.patch @@ -1,6 +1,6 @@ -diff -rc make-orig/job.c make-3.81/job.c -*** make-orig/job.c 2006-03-20 04:03:04.000000000 +0100 ---- make-3.81/job.c 2006-06-21 17:31:52.000000000 +0200 +diff -rc make-3.81-orig/job.c make-3.81/job.c +*** make-3.81-orig/job.c 2006-03-20 04:03:04.000000000 +0100 +--- make-3.81/job.c 2008-02-20 17:41:25.000000000 +0100 *************** *** 1083,1089 **** appear. */ @@ -18,9 +18,9 @@ diff -rc make-orig/job.c make-3.81/job.c /* Tell update_goal_chain that a command has been started on behalf of this target. It is important that this happens here and not in -diff -rc make-orig/main.c make-3.81/main.c -*** make-orig/main.c 2006-03-20 03:36:37.000000000 +0100 ---- make-3.81/main.c 2006-06-21 17:48:43.000000000 +0200 +diff -rc make-3.81-orig/main.c make-3.81/main.c +*** make-3.81-orig/main.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/main.c 2008-02-20 17:41:25.000000000 +0100 *************** *** 886,891 **** --- 886,900 ---- @@ -83,9 +83,9 @@ diff -rc make-orig/main.c make-3.81/main.c + + int logNestingStdout = 0; + int logNestingStderr = 0; -diff -rc make-orig/make.h make-3.81/make.h -*** make-orig/make.h 2006-02-16 00:54:43.000000000 +0100 ---- make-3.81/make.h 2006-06-21 17:39:35.000000000 +0200 +diff -rc make-3.81-orig/make.h make-3.81/make.h +*** make-3.81-orig/make.h 2006-02-16 00:54:43.000000000 +0100 +--- make-3.81/make.h 2008-02-20 17:41:25.000000000 +0100 *************** *** 609,611 **** --- 609,613 ---- @@ -94,15 +94,16 @@ diff -rc make-orig/make.h make-3.81/make.h + extern int logNestingStdout; + extern int logNestingStderr; -diff -rc make-orig/remake.c make-3.81/remake.c -*** make-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 ---- make-3.81/remake.c 2006-06-21 17:31:52.000000000 +0200 +diff -rc make-3.81-orig/remake.c make-3.81/remake.c +*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/remake.c 2008-02-20 17:44:01.000000000 +0100 *************** *** 1120,1126 **** ---- 1120,1130 ---- +--- 1120,1131 ---- /* The normal case: start some commands. */ if (!touch_flag || file->cmds->any_recurse) { ++ log_working_directory (1); + fprintf(stderr, "\e[pbuilding %s\n", file->name); + logNestingStderr++; execute_file_commands (file); From 96aa40524e42cf5f52ccb86b4356baee18107e37 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Feb 2008 17:22:32 +0000 Subject: [PATCH 08/10] * Hack hack hack. svn path=/nixpkgs/branches/stdenv-updates/; revision=10788 --- pkgs/stdenv/generic/builder.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index f772b1cc19b..0af3210dbc9 100644 --- a/pkgs/stdenv/generic/builder.sh +++ b/pkgs/stdenv/generic/builder.sh @@ -3,6 +3,10 @@ p2=$param2 p3=$param3 p4=$param4 p5=$param5 +_preHook="$preHook" +_postHook="$postHook" +preHook= +postHook= source $stdenv/setup @@ -11,8 +15,8 @@ mkdir $out # Can't use substitute() here, because replace may not have been # built yet (in the bootstrap). sed \ - -e "s^@preHook@^$preHook^g" \ - -e "s^@postHook@^$postHook^g" \ + -e "s^@preHook@^$_preHook^g" \ + -e "s^@postHook@^$_postHook^g" \ -e "s^@initialPath@^$initialPath^g" \ -e "s^@gcc@^$gcc^g" \ -e "s^@shell@^$shell^g" \ From b67cb39b7dadb9d38507b86a515a7b13667779c2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Feb 2008 17:22:45 +0000 Subject: [PATCH 09/10] svn path=/nixpkgs/branches/stdenv-updates/; revision=10789 --- pkgs/data/fonts/freefont-ttf/default.nix | 8 +++++--- pkgs/development/libraries/aterm/2.4.2-fixes.nix | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/data/fonts/freefont-ttf/default.nix b/pkgs/data/fonts/freefont-ttf/default.nix index 19e1a21450d..e1f8c74ae62 100644 --- a/pkgs/data/fonts/freefont-ttf/default.nix +++ b/pkgs/data/fonts/freefont-ttf/default.nix @@ -6,6 +6,8 @@ stdenv.mkDerivation { url = http://download.savannah.gnu.org/releases/freefont/freefont-ttf-20060126.tar.gz; md5 = "822aba4e2ed065d9d3ded6e26e495854"; }; - buildPhase = "true"; - installPhase = "ensureDir $out/share/fonts/truetype; cp *.ttf $out/share/fonts/truetype"; -} \ No newline at end of file + installPhase = '' + ensureDir $out/share/fonts/truetype + cp *.ttf $out/share/fonts/truetype + ''; +} diff --git a/pkgs/development/libraries/aterm/2.4.2-fixes.nix b/pkgs/development/libraries/aterm/2.4.2-fixes.nix index 3144154c9e6..7c70afc621b 100644 --- a/pkgs/development/libraries/aterm/2.4.2-fixes.nix +++ b/pkgs/development/libraries/aterm/2.4.2-fixes.nix @@ -6,6 +6,7 @@ stdenv.mkDerivation { url = http://losser.st-lab.cs.uu.nl/~eelco/dist/aterm-2.4.2-fixes-r2.tar.bz2; sha256 = "1w3bxdpc2hz29li5ssmdcz3x0fn47r7g62ns0v8nazxwf40vff4j"; }; + doCheck = true; meta = { homepage = http://www.cwi.nl/htbin/sen1/twiki/bin/view/SEN1/ATerm; license = "LGPL"; From ed3cf0a497f6a89460fa068d17a6d50088569b2a Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 21 Feb 2008 04:48:55 +0000 Subject: [PATCH 10/10] Fixed setup.sh - non-default Makefile may be passed in makeFlags. OpenFire added, doesn't work yet svn path=/nixpkgs/branches/stdenv-updates/; revision=10795 --- pkgs/development/tools/misc/lsof/default.nix | 2 +- pkgs/servers/xmpp/openfire/3.4.5.nix | 29 ++++++++++++++++++++ pkgs/stdenv/generic/setup.sh | 2 +- pkgs/top-level/all-packages.nix | 6 ++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 pkgs/servers/xmpp/openfire/3.4.5.nix diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 4aa50117837..da5495aa64e 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "0azvl43niqkq94drx52p6dvp70r38f25fqw181ywmvqn80dbb3c9"; }; - unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=lsof_*; "; + unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*); "; preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';"; configurePhase = "./Configure -n linux;"; installPhase = " mkdir -p $out/bin $out/man/man8; cp lsof.8 $out/man/man8/; cp lsof $out/bin"; diff --git a/pkgs/servers/xmpp/openfire/3.4.5.nix b/pkgs/servers/xmpp/openfire/3.4.5.nix new file mode 100644 index 00000000000..2501372fe55 --- /dev/null +++ b/pkgs/servers/xmpp/openfire/3.4.5.nix @@ -0,0 +1,29 @@ +args : with args; with builderDefs {src="";} null; + let localDefs = builderDefs (rec { + src = /* put a fetchurl here */ + fetchurl { + url = http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_4_5.tar.gz; + sha256 = "0j1ddk0wiqxhbi3872vf2mqx0jynswrvbfbabrp73zqhz3mdvsal"; + }; + + buildInputs = [jre]; + configureFlags = []; + + installPhase = FullDepEntry ('' + sed -e 's@\(common_jvm_locations\)=.*@\1${jre}@' -i bin/openfire + cp -r . $out + '') + ["minInit" "doUnpack" "findInputs"]; + }) null; /* null is a terminator for sumArgs */ + in with localDefs; +stdenv.mkDerivation rec { + name = "openfire-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [ doForceShare doPropagate installPhase]); + meta = { + description = " + XMPP server in Java. +"; + }; +} diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 395de988e4c..a33e715a4cd 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -615,7 +615,7 @@ buildPhase() { eval "$preBuild" - if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then + if test -z "$makeFlags" ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then echo "no Makefile, doing nothing" return fi diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 436a3701125..cf6438982fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3257,6 +3257,12 @@ rec { inherit fetchurl stdenv openssh; }; + openfireFun = lib.sumArgs (selectVersion ../servers/xmpp/openfire "3.4.5") { + inherit builderDefs jre; + }; + + openfire = openfireFun null; + postgresql = selectVersion ../servers/sql/postgresql "8.3.0" { inherit fetchurl stdenv readline ncurses zlib; };