diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index adb8e170feb1..e4a3874de419 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -1,36 +1,19 @@ -args: with args; - let localDefs = builderDefs.passthru.function { - src = - fetchurl { - url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz; - sha256 = "17bjc2rnqspg1mbay4b1hhgg08iadapwf6w98gbv3r84rv1mhgls"; - }; +{ stdenv, fetchurl, wxGTK, pkgconfig, gettext, gtk, glib, zlib }: - buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk - gettext glib]; - }; - in with localDefs; -let - postInstall = FullDepEntry (" - old_rpath=$(patchelf --print-rpath \$out/bin/audacity); - patchelf --set-rpath \$old_rpath:${gtk}/lib:${glib}/lib \$out/bin/audacity; - ") [minInit]; - preBuild = FullDepEntry (" - sed -e '/\\/usr\\/local\\/lib\\/ladspa/awxGetApp()."+ - "AddUniquePathToPathList(wxGetenv(wxT(\"HOME\"))+"+ - "wxT(\"/.ladspa-plugins\"), pathList);' - - ") [minInit]; -in stdenv.mkDerivation { - name = "audacity-1.3.3"; + name = "audacity-1.3.7"; - builder = writeScript "audacity-1.3.3-builder" - (textClosure localDefs [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]); + NIX_CFLAGS_COMPILE = "-fPIC -lgtk-x11-2.0 -lglib-2.0 -lgobject-2.0 -lz"; + + src = fetchurl { + url = mirror://sourceforge/audacity/audacity-fullsrc-1.3.7.tar.bz2; + sha256 = "1kashc6cc6d5g6i59nqcrl795x1jqdh0lpg3msa1wckfj3hpljmy"; + }; + buildInputs = [ wxGTK pkgconfig gettext gtk glib zlib ]; meta = { - description = "Audacity sound editor."; + description = "Sound editor with graphical UI"; homepage = http://audacity.sourceforge.net; - inherit src; + license = "GPLv2+"; }; } diff --git a/pkgs/applications/editors/eclipse/builder.sh b/pkgs/applications/editors/eclipse/builder.sh index 6e064e1fa9b6..050d71761c29 100755 --- a/pkgs/applications/editors/eclipse/builder.sh +++ b/pkgs/applications/editors/eclipse/builder.sh @@ -15,9 +15,16 @@ find $out \( -type f -a -perm +0100 \) \ --set-rpath "$rpath" {} \; # Make a wrapper script so that the proper JDK is found. -makeWrapper $out/eclipse/eclipse $out/bin/eclipse \ - --prefix PATH ":" "$jdk/bin" \ - --prefix LD_LIBRARY_PATH ":" "$rpath" +# don't use makeWrapper in order to change the last line. + +ensureDir $out/bin +cat >> $out/bin/eclipse << EOF +#! /bin/sh -e +export PATH=${jdk}/bin\${PATH:+:}\$PATH +export LD_LIBRARY_PATH=$rpath\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH +exec \$(dirname $0)/../eclipse/eclipse $@ +EOF +chmod +x $out/bin/eclipse ensureDir plugin-working-dir workingdir="$(pwd)/plugin-working-dir" diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index 17fbd51cb576..1cbfff919868 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -1,22 +1,33 @@ -{fetchurl, stdenv, makeWrapper, jdk, gtk, glib, libXtst, plugins ? []}: +# recommended installation: +# nix-build -A eclipsesdk +# then cp -r $store-path ~/my-eclipse; chmod -R 777 ~/my-eclipse # ugh! I'm to lazy to assign permissions properly +# maybe also using a wrapper such as this (lower values should suffice for most needs) +# eclipseWrapper () { +# "$@" -vmargs -Xms2048m -Xmx2048m -XX:MaxPermSize=2048m +# } +# +# Why use a local copy? This way it's easier to use the update manager to get plugins :-) + + +{fetchurl, stdenv, jdk, gtk, glib, libXtst, plugins ? []}: let { body = stdenv.mkDerivation { - name = "eclipse-sdk-3.3.2"; + name = "eclipse-sdk-3.5M6"; builder = ./builder.sh; src = bindist; - buildInputs = [makeWrapper]; + buildInputs = []; inherit jdk plugins; libraries = [gtk glib libXtst]; }; bindist = if (stdenv.system == "x86_64-linux") then fetchurl { - url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz; - sha256 = "fa7ff6fd17d053a53f743fa3d79493aa2e359402563cc736db9709a87826af21"; + url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk-x86_64.tar.gz; + sha256 = "10p4idp5rcdf7xqwfk3kvmjxhi8x1v835m0y4pn9q4nhfb5643pi"; } else fetchurl { - url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-SDK-3.3.2-linux-gtk.tar.gz; - sha256 = "624460c87f763b855fcddca86d969f2e4c730e654fe1a0dd69624afe576b13c8"; + url = ftp://mirror.micromata.de/eclipse/eclipse/downloads/drops/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk.tar.gz; + sha256 = "1z8j26b632ydhqrmwgbcqgiq7f1a542jam06z2h62mcbqazrcyah"; }; } diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 9cf07183ff28..d16cb03af033 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -4,11 +4,11 @@ }: stdenv.mkDerivation { - name = "gimp-2.6.5"; + name = "gimp-2.6.6"; src = fetchurl { - url = ftp://ftp.gtk.org/pub/gimp/v2.6/gimp-2.6.5.tar.bz2; - sha256 = "08g5rc383ijcdfqr9ybrn6qazxqqfq0pndknsgh25z19bhghh2b2"; + url = ftp://ftp.gtk.org/pub/gimp/v2.6/gimp-2.6.6.tar.bz2; + sha256 = "0l875y4krqxxappnbw08s44bp3njjjriwyl8br5wmx25a3x63hjk"; }; buildInputs = [ diff --git a/pkgs/applications/graphics/gwenview/default.nix b/pkgs/applications/graphics/gwenview/default.nix new file mode 100644 index 000000000000..d7545ece55ca --- /dev/null +++ b/pkgs/applications/graphics/gwenview/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, kdelibs, exiv2, libXt, libXext, zlib, libjpeg, perl, qt3, + libpng, expat }: + +stdenv.mkDerivation { + name = "gwenview-1.4.2"; + + src = fetchurl { + url = mirror://sourceforge/gwenview/gwenview-1.4.2.tar.bz2; + sha256 = "26ec1a3f3ac7cce9584b44e6090402776fb84df3fc5f9e5aadbe66e9887851fd"; + }; + + configurePhase = '' + LDFLAGS="$LDFLAGS -ljpeg" ./configure --without-arts --prefix=$out + ''; + + buildInputs = [ kdelibs exiv2 libXt libXext zlib libjpeg perl qt3 libpng expat ]; + + meta = { + homepage = http://gwenview.sourceforge.net/; + description = "KDE photo viewer"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix new file mode 100644 index 000000000000..0ecb7289f717 --- /dev/null +++ b/pkgs/applications/graphics/paraview/default.nix @@ -0,0 +1,34 @@ +{ fetchurl, stdenv, cmake, qt4 }: + +stdenv.mkDerivation { + name = "paraview-3.4.0"; + src = fetchurl { + url = http://www.paraview.org/files/v3.4/paraview-3.4.0.tar.gz; + sha256 = "27544f442e957e9aa60b32c674f2dcd84fffeecc9a40071ef6e305333413187d"; + }; + + # I added these flags to get all the rpaths right, which I guess they are + # taken from the qt4 sources. Not very nice. + cmakeFlags = "-DCMAKE_SHARED_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/paraview-3.4\"" + + " -DCMAKE_EXE_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/paraview-3.4" + + " -lpng12 -lSM -lICE -lXrender -lXrandr -lXcursor -lXinerama" + + " -lXfixes -lfreetype -lfontconfig -lXext -lX11 -lssl -lXt -lz\"" + + " -DCMAKE_SKIP_BUILD_RPATH=ON" + + " -DCMAKE_BUILD_TYPE=Release" + + " -DCMAKE_INSTALL_PREFIX=$out"; + + dontUseCmakeConfigure = true; + + # I rewrote the configure phase to get the $out references evaluated in + # cmakeFlags + configurePhase = '' + set -x + mkdir -p build; + cd build + eval -- "cmake .. $cmakeFlags" + set +x + ''; + + buildInputs = [ cmake qt4 ]; +} + diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index 2a8d78b0f0ed..c2fb0810ba9f 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -1,11 +1,11 @@ args: with args; stdenv.mkDerivation { - name = "djvulibre-3.5.19"; + name = "djvulibre-3.5.21"; src = fetchurl { - url = mirror://sourceforge/djvu/djvulibre-3.5.19.tar.gz; - sha256 = "0y6d9ka42llm7h64fc73s4wqcbxg31kallyfaarhkqsxyiaa3zsp"; + url = mirror://sourceforge/djvu/djvulibre-3.5.21.tar.gz; + sha256 = "39f80c1810be22c5ea7f6a44bbb449c3e29902895dcff9da6a8440891a67b8b4"; }; buildInputs = [qt libX11 libjpeg libtiff libpng ghostscript zlib libungif x11 mesa]; diff --git a/pkgs/applications/misc/gv/default.nix b/pkgs/applications/misc/gv/default.nix index 109c3d8102f9..88f84cdd122e 100644 --- a/pkgs/applications/misc/gv/default.nix +++ b/pkgs/applications/misc/gv/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchurl, Xaw3d, ghostscriptX }: stdenv.mkDerivation rec { - name = "gv-3.6.6"; + name = "gv-3.6.7"; src = fetchurl { url = "mirror://gnu/gv/${name}.tar.gz"; - sha256 = "08xnjg5nimrksn2fl18589ncb26vaabbypmvay8hh8psjsks5683"; + sha256 = "1cdkkxamsicpk0jdbrkjpxhcsrx0b82kqgrc4j407q2gc3qs8wgf"; }; buildInputs = [ Xaw3d ghostscriptX ]; - postConfigure = '' + patchPhase = '' sed 's|\|${ghostscriptX}/bin/gs|g' -i src/*.in sed 's|"gs"|"${ghostscriptX}/bin/gs"|g' -i src/*.c ''; @@ -20,6 +20,13 @@ stdenv.mkDerivation rec { meta = { homepage = http://www.gnu.org/software/gv/; description = "GNU gv, a PostScript/PDF document viewer"; + + longDescription = '' + GNU gv allows users to view and navigate through PostScript and + PDF documents on an X display by providing a graphical user + interface for the Ghostscript interpreter. + ''; + license = "GPLv3+"; }; } diff --git a/pkgs/applications/misc/qcad/default.nix b/pkgs/applications/misc/qcad/default.nix new file mode 100644 index 000000000000..00d4fe99ba3b --- /dev/null +++ b/pkgs/applications/misc/qcad/default.nix @@ -0,0 +1,42 @@ +# translations still misssing +args: with args; +stdenv.mkDerivation { + name = "qcad-2.0.5.0-1-community"; + + src = fetchurl { + url = http://www.ribbonsoft.com/archives/qcad/qcad-2.0.5.0-1-community.src.tar.gz; + sha256 = "07aiw7zjf1fc04dhgwwp29adwb2qs165n7v04lh09zy0k2aplcl3"; + }; + + # TODO: add translations + buildPhase = '' + cd scripts + sh build_qcad.sh notrans + cd .. + ''; + + buildInputs = [qt3 libpng libXext libX11]; + + patchPhase = '' + sed -i 's/-pedantic//' mkspecs/defs.pro + patch -p1 < ${ ./qcad-2.0.4.0-1.src-intptr.patch /* taken from gentoo, fixes amd64 compilation issue */} + ''; + + # probably there is more to be done. But this seems to work for now (eg see gentoo ebuild) + installPhase = '' + ensureDir $out/{bin,share} + cp -r qcad $out/share + cat >> $out/bin/qcad << EOF + #!/bin/sh + cd $out/share/qcad + ./qcad "\$@" + EOF + chmod +x $out/bin/qcad + ''; + + meta = { + description="A 2D CAD package based upon Qt."; + homepage = http://www.ribbonsoft.de/qcad.html; + license = "GPLv2"; # community edition + }; +} diff --git a/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch b/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch new file mode 100644 index 000000000000..6d8b6acca5b5 --- /dev/null +++ b/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch @@ -0,0 +1,24 @@ +diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp +--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp 2004-09-14 15:13:02.000000000 -0500 ++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp 2006-06-23 14:21:40.000000000 -0500 +@@ -849,7 +849,7 @@ + os << " layer: NULL "; + } else { + os << " layer: " << e.layer->getName().latin1() << " "; +- os << " layer address: " << (int)(e.layer) << " "; ++ os << " layer address: " << (intptr_t)(e.layer) << " "; + } + + os << e.pen << "\n"; +diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp +--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp 2004-09-14 15:13:02.000000000 -0500 ++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp 2006-06-23 14:21:23.000000000 -0500 +@@ -57,7 +57,7 @@ + os << " name: " << l.getName().latin1() + << " pen: " << l.getPen() + << " frozen: " << (int)l.isFrozen() +- << " address: " << (int)(&l) ++ << " address: " << (intptr_t)(&l) + << std::endl; + return os; + } diff --git a/pkgs/applications/networking/browsers/icecat-3/default.nix b/pkgs/applications/networking/browsers/icecat-3/default.nix index 39ce47ef0660..1b0a145963b2 100644 --- a/pkgs/applications/networking/browsers/icecat-3/default.nix +++ b/pkgs/applications/networking/browsers/icecat-3/default.nix @@ -4,13 +4,13 @@ , freetype, fontconfig , application ? "browser" }: -let version = "3.0.6-g1"; in +let version = "3.0.7-g1"; in stdenv.mkDerivation { name = "icecat-${version}"; src = fetchurl { url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.bz2"; - sha256 = "0lcxvlviwgaj9w6ywn0656a2y3qdxdlw0mf5f9ljdd9jpw4fxjih"; + sha256 = "1xfv643prj22gy9g3sbzq13d8pv1yvzr2xi4z91r802x9rrm6grm"; }; buildInputs = [ diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index 7c735b8954c5..0c4fac23e0bb 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation (rec { - name = "unison-2.13.16"; + name = "unison-2.27.57"; src = fetchurl { - url = "http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/${name}.tar.gz"; - sha256 = "808400a933aeb67654edc770822cd186d1b2adc92e7cb5836996c71c69ffe656"; + url = "http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.27.57.tar.gz"; + sha256 = "49299ec14216a8467b2c6ba148f8145bec31fa787433f9ce3851c2d62f0035ae"; }; buildInputs = [ocaml makeWrapper]; diff --git a/pkgs/applications/taxes/aangifte-2008/builder.sh b/pkgs/applications/taxes/aangifte-2008/builder.sh new file mode 100644 index 000000000000..e2d2658024a4 --- /dev/null +++ b/pkgs/applications/taxes/aangifte-2008/builder.sh @@ -0,0 +1,21 @@ +source $stdenv/setup + +echo $NIX_GCC + +buildPhase=buildPhase +buildPhase() { + for i in bin/*; do + patchelf \ + --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \ + $i + done +} + +installPhase=installPhase +installPhase() { + ensureDir $out + cp -prvd * $out/ +} + +genericBuild \ No newline at end of file diff --git a/pkgs/applications/taxes/aangifte-2008/default.nix b/pkgs/applications/taxes/aangifte-2008/default.nix new file mode 100644 index 000000000000..85d5b3045be0 --- /dev/null +++ b/pkgs/applications/taxes/aangifte-2008/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, libX11, libXext, libSM}: + +stdenv.mkDerivation { + name = "aangifte2008-1"; + + builder = ./builder.sh; + + src = fetchurl { + url = http://download.belastingdienst.nl/belastingdienst/apps/linux/ib2008_linux.tar.gz; + sha256 = "0p46bc1b14hgf07illg3crjgjdflkcknk4nzm7b73cwkni57scx3"; + }; + + inherit libX11 libXext libSM; + + dontStrip = true; + dontPatchELF = true; + + meta = { + description = "Elektronische aangifte IB 2008 (Dutch Tax Return Program)"; + url = http://www.belastingdienst.nl/particulier/aangifte2008/aangifte_2008/aangifte_2008.html; + }; +} diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix index 427c3e9c9558..78b3107c95be 100644 --- a/pkgs/applications/version-management/monotone/default.nix +++ b/pkgs/applications/version-management/monotone/default.nix @@ -1,10 +1,17 @@ -{stdenv, fetchurl, boost, zlib}: +{stdenv, fetchurl, boost, zlib, botan, libidn, + lua, pcre, sqlite}: -stdenv.mkDerivation { - name = "monotone-0.42"; +let + version = "0.43"; +in stdenv.mkDerivation { + name = "monotone-${version}"; src = fetchurl { - url = http://monotone.ca/downloads/0.42/monotone-0.42.tar.gz; - sha256 = "0i6srfx0ps8hlgdbn0y7iy9gi33a7vpiwdm5rhxjxgvhn5j9svdr"; + url = "http://monotone.ca/downloads/${version}/monotone-${version}.tar.gz"; + sha256 = "1vfvvk4flv6n7x1nrizjpwpsfhf3dv3b60h7cs4ysgvzb76s41mz"; }; - buildInputs = [boost zlib]; + buildInputs = [boost zlib botan libidn lua pcre sqlite]; + preConfigure = '' + export sqlite_LIBS=-lsqlite3 + export NIX_LDFLAGS="$NIX_LDFLAGS -ldl" + ''; } diff --git a/pkgs/applications/version-management/subversion-1.4.x/builder.sh b/pkgs/applications/version-management/subversion-1.4.x/builder.sh deleted file mode 100644 index 0e28b6e3bdde..000000000000 --- a/pkgs/applications/version-management/subversion-1.4.x/builder.sh +++ /dev/null @@ -1,41 +0,0 @@ -source $stdenv/setup - -if test "$httpServer"; then - makeFlags="APACHE_LIBEXECDIR=$out/modules $makeFlags" -fi - - -postInstall() { - if test "$pythonBindings"; then - make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn - make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn - fi - if test "$perlBindings"; then - make swig-pl-lib - make install-swig-pl-lib - cd subversion/bindings/swig/perl/native - perl Makefile.PL PREFIX=$out - make install - cd - - fi - if test "$javahlBindings"; then - mkdir -p subversion/bindings/java/javahl/classes # bug fix - make javahl - make install-javahl - # Hack to prevent java.lang.UnsatisfiedLinkError: no svnjavahl in java.library.path - cd $out/lib - ln -s libsvnjavahl-1.so libsvnjavahl.so - cd - - mkdir -p $out/share/doc/$name - $jdk/bin/javadoc -d $out/share/doc/$name \ - -windowtitle "JavaHL Subversion Bindings" \ - -link http://java.sun.com/j2se/1.4.2/docs/api/ \ - subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/*.java - fi - ensureDir $out/share/emacs/site-lisp - cp contrib/client-side/psvn/psvn.el contrib/client-side/vc-svn.el $out/share/emacs/site-lisp/ -} -postInstall=postInstall - - -genericBuild diff --git a/pkgs/applications/version-management/subversion-1.4.x/default.nix b/pkgs/applications/version-management/subversion-1.4.x/default.nix deleted file mode 100644 index e036595ad2e9..000000000000 --- a/pkgs/applications/version-management/subversion-1.4.x/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ bdbSupport ? false -, httpServer ? false -, sslSupport ? false -, compressionSupport ? false -, pythonBindings ? false -, perlBindings ? false -, javahlBindings ? false -, stdenv, fetchurl, apr, aprutil, neon, zlib -, httpd ? null, expat, swig ? null, jdk ? null -}: - -assert bdbSupport -> aprutil.bdbSupport; -assert httpServer -> httpd != null && httpd.apr == apr && httpd.aprutil == aprutil; -assert pythonBindings -> swig != null && swig.pythonSupport; -assert javahlBindings -> jdk != null; -assert sslSupport -> neon.sslSupport; -assert compressionSupport -> neon.compressionSupport; - -stdenv.mkDerivation rec { - - version = "1.4.6"; # attribute version is used within svnmerge as well - - name = "subversion-${version}"; - - builder = ./builder.sh; - src = fetchurl { - url = http://subversion.tigris.org/downloads/subversion-1.4.6.tar.bz2; - sha1 = "a9c941e2309744f6a2986200698b60da057a7527"; - }; - - buildInputs = - [expat zlib] - ++ stdenv.lib.optional pythonBindings swig.python - ++ stdenv.lib.optional perlBindings swig.perl - ; - - configureFlags = '' - --without-gdbm --disable-static - --with-apr=${apr} -with-apr-util=${aprutil} --with-neon=${neon} - --disable-keychain - ${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"} - ${if httpServer then "--with-apxs=${httpd}/bin/apxs" else "--without-apxs"} - ${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"} - ${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""} - --disable-neon-version-check - ''; - - inherit httpServer pythonBindings javahlBindings perlBindings; - - patches = [ ./subversion-respect_CPPFLAGS_in_perl_bindings.patch ]; - - passthru = { - inherit perlBindings pythonBindings; - python = if swig != null && swig ? python then swig.python else null; - }; - - meta = { - description = "A version control system intended to be a compelling replacement for CVS in the open source community"; - homepage = http://subversion.tigris.org/; - }; -} - diff --git a/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch b/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch deleted file mode 100644 index 86c18145c2e7..000000000000 --- a/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: subversion/bindings/swig/perl/native/Makefile.PL.in -=================================================================== ---- subversion-1.4.5/subversion/bindings/swig/perl/native/Makefile.PL.in (revision 27184) -+++ subversion-1.4.5/subversion/bindings/swig/perl/native/Makefile.PL.in (working copy) -@@ -26,6 +26,7 @@ - my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/); - - my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@'; -+my $cppflags = '@CPPFLAGS@'; - my $apr_cflags = '@SVN_APR_INCLUDES@'; - my $apu_cflags = '@SVN_APRUTIL_INCLUDES@'; - -@@ -38,7 +39,7 @@ - - my %config = ( - ABSTRACT => 'Perl bindings for Subversion', -- INC => join(' ',$apr_cflags, $apu_cflags, -+ INC => join(' ', $cppflags, $apr_cflags, $apu_cflags, - " -I$swig_srcdir/perl/libsvn_swig_perl", - " -I$svnlib_srcdir/include", - " -I$svnlib_builddir", - diff --git a/pkgs/applications/version-management/subversion-1.5.x/default.nix b/pkgs/applications/version-management/subversion/1.5.nix similarity index 93% rename from pkgs/applications/version-management/subversion-1.5.x/default.nix rename to pkgs/applications/version-management/subversion/1.5.nix index b89ef9cf468a..1cf1b6e915fd 100644 --- a/pkgs/applications/version-management/subversion-1.5.x/default.nix +++ b/pkgs/applications/version-management/subversion/1.5.nix @@ -20,13 +20,13 @@ assert compressionSupport -> neon.compressionSupport; stdenv.mkDerivation rec { - version = "1.5.5"; + version = "1.5.6"; name = "subversion-${version}"; src = fetchurl { - url = http://subversion.tigris.org/downloads/subversion-1.5.5.tar.bz2; - sha256 = "1gkpmnwspb3x1310l97kb7n1kh5bmdb7bzq92xwm34sqbnx29kw8"; + url = "http://subversion.tigris.org/downloads/${name}.tar.bz2"; + sha256 = "1hj69zvg6wk6gryaaa1gi896j53633560wkirypdjhyczrszw0gp"; }; buildInputs = [zlib apr aprutil] diff --git a/pkgs/applications/version-management/subversion/1.6.nix b/pkgs/applications/version-management/subversion/1.6.nix new file mode 100644 index 000000000000..b2ee89232f13 --- /dev/null +++ b/pkgs/applications/version-management/subversion/1.6.nix @@ -0,0 +1,77 @@ +{ bdbSupport ? false # build support for Berkeley DB repositories +, httpServer ? false # build Apache DAV module +, httpSupport ? false # client must support http +, sslSupport ? false # client must support https +, compressionSupport ? false # client must support http compression +, pythonBindings ? false +, perlBindings ? false +, javahlBindings ? false +, stdenv, fetchurl, apr, aprutil, neon, zlib, sqlite +, httpd ? null, expat, swig ? null, jdk ? null +, static ? false +}: + +assert bdbSupport -> aprutil.bdbSupport; +assert httpServer -> httpd != null && httpd.apr == apr && httpd.aprutil == aprutil; +assert pythonBindings -> swig != null && swig.pythonSupport; +assert javahlBindings -> jdk != null; +assert sslSupport -> neon.sslSupport; +assert compressionSupport -> neon.compressionSupport; + +stdenv.mkDerivation rec { + + version = "1.6.0"; + + name = "subversion-${version}"; + + src = fetchurl { + url = "http://subversion.tigris.org/downloads/${name}.tar.bz2"; + sha256 = "d6fb8bf61638580a0ad661edb642c38fbffad2a4c273e3f8631c6cc0da14d0a2"; + }; + + buildInputs = [zlib apr aprutil sqlite] + ++ stdenv.lib.optional httpSupport neon + ++ stdenv.lib.optional pythonBindings swig.python + ++ stdenv.lib.optional perlBindings swig.perl + ; + + configureFlags = '' + --disable-keychain + ${if static then "--disable-shared --enable-all-static" else "--disable-static"} + ${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"} + ${if httpServer then "--with-apxs=${httpd}/bin/apxs" else "--without-apxs"} + ${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"} + ${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""} + --disable-neon-version-check + ''; + + preBuild = '' + makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules) + ''; + + postInstall = '' + ensureDir $out/share/emacs/site-lisp + cp contrib/client-side/emacs/*.el $out/share/emacs/site-lisp/ + + if test "$pythonBindings"; then + make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn + make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn + fi + + if test "$perlBindings"; then + make swig-pl-lib + make install-swig-pl-lib + cd subversion/bindings/swig/perl/native + perl Makefile.PL PREFIX=$out + make install + cd - + fi + ''; # */ + + inherit perlBindings pythonBindings; + + meta = { + description = "A version control system intended to be a compelling replacement for CVS in the open source community"; + homepage = http://subversion.tigris.org/; + }; +} diff --git a/pkgs/build-support/make-wrapper/make-wrapper.sh b/pkgs/build-support/make-wrapper/make-wrapper.sh index f1d1da0ba421..c13f623bcda0 100644 --- a/pkgs/build-support/make-wrapper/make-wrapper.sh +++ b/pkgs/build-support/make-wrapper/make-wrapper.sh @@ -66,7 +66,7 @@ makeWrapper() { fi done - echo "exec -a $(basename "$wrapper") \"$original\" $flagsBefore \"\$@\"" >> $wrapper + echo "exec \"$original\" $flagsBefore \"\$@\"" >> $wrapper chmod +x $wrapper } diff --git a/pkgs/build-support/release/binary-tarball.nix b/pkgs/build-support/release/binary-tarball.nix new file mode 100644 index 000000000000..f8bb5282ee2f --- /dev/null +++ b/pkgs/build-support/release/binary-tarball.nix @@ -0,0 +1,87 @@ +/* This function builds a binary tarball. The resulting binaries are + usually only useful if they are don't have any runtime dependencies + on any paths in the Nix store, since those aren't distributed in + the tarball. For instance, the binaries should be statically + linked: they can't depend on dynamic libraries in the store + (including Glibc). + + The binaries are built and installed with a prefix of /usr/local by + default. They are installed by setting DESTDIR to a temporary + directory, so the Makefile of the package should support DESTDIR. +*/ + +{ src, stdenv +, name ? "binary-tarball" +, ... } @ args: + +stdenv.mkDerivation ( + + { + # Also run a `make check'. + doCheck = true; + + showBuildStats = true; + + prefix = "/usr/local"; + + postPhases = "finalPhase"; + } + + // args // + + { + name = name + (if src ? version then "-" + src.version else ""); + + postHook = '' + ensureDir $out/nix-support + echo "$system" > $out/nix-support/system + + # If `src' is the result of a call to `makeSourceTarball', then it + # has a subdirectory containing the actual tarball(s). If there are + # multiple tarballs, just pick the first one. + origSrc=$src + if test -d $src/tarballs; then + src=$(ls $src/tarballs/*.tar.bz2 $src/tarballs/*.tar.gz | sort | head -1) + fi + + if test -e $origSrc/nix-support/hydra-release-name; then + releaseName=$(cat $origSrc/nix-support/hydra-release-name) + fi + + installFlagsArray=(DESTDIR=$TMPDIR/inst) + + # Prefix hackery because of a bug in stdenv (it tries to `mkdir + # $prefix', which doesn't work due to the DESTDIR). + configureFlags="--prefix=$prefix $configureFlags" + dontAddPrefix=1 + prefix=$TMPDIR/inst$prefix + ''; # */ + + + doDist = true; + + distPhase = + '' + ensureDir $out/tarballs + tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst . + ''; + + + finalPhase = + '' + for i in $out/tarballs/*; do + echo "file binary-dist $i" >> $out/nix-support/hydra-build-products + done + + # Propagate the release name of the source tarball. This is + # to get nice package names in channels. + test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name) + ''; + + + meta = (if args ? meta then args.meta else {}) // { + description = "Build of a generic binary distribution"; + }; + + } +) diff --git a/pkgs/build-support/release/debian-build.nix b/pkgs/build-support/release/debian-build.nix index d41750733b5d..b352e993b94d 100644 --- a/pkgs/build-support/release/debian-build.nix +++ b/pkgs/build-support/release/debian-build.nix @@ -13,7 +13,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation ( prefix = "/usr"; - phases = "installExtraDebsPhase sysInfoPhase unpackPhase patchPhase configurePhase buildPhase checkPhase installPhase distPhase"; + prePhases = "installExtraDebsPhase sysInfoPhase"; } // removeAttrs args ["vmTools"] // @@ -52,7 +52,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation ( installCommand = '' export LOGNAME=root - ${checkinstall}/sbin/checkinstall -y -D make install + ${checkinstall}/sbin/checkinstall --nodoc -y -D make install ensureDir $out/debs find . -name "*.deb" -exec cp {} $out/debs \; @@ -60,7 +60,10 @@ vmTools.runInLinuxImage (stdenv.mkDerivation ( shopt -s nullglob for i in $out/debs/*.deb; do header "Generated DEB package: $i" - dpkg-deb --info $i + dpkg-deb --info "$i" + pkgName=$(dpkg-deb -W "$i" | awk '{print $1}') + dpkg -i "$i" + dpkg -r "$pkgName" echo "file deb $i" >> $out/nix-support/hydra-build-products stopNest done diff --git a/pkgs/build-support/release/default.nix b/pkgs/build-support/release/default.nix index 0c0ee1bec555..1177024c8573 100644 --- a/pkgs/build-support/release/default.nix +++ b/pkgs/build-support/release/default.nix @@ -4,10 +4,16 @@ with pkgs; rec { - makeSourceTarball = args: import ./make-source-tarball.nix ( + sourceTarball = args: import ./source-tarball.nix ( { inherit stdenv autoconf automake libtool; } // args); + makeSourceTarball = sourceTarball; # compatibility + + binaryTarball = args: import ./binary-tarball.nix ( + { inherit stdenv; + } // args); + nixBuild = args: import ./nix-build.nix ( { inherit stdenv; } // args); diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix index f9d2351d9253..703dc07a6e44 100644 --- a/pkgs/build-support/release/nix-build.nix +++ b/pkgs/build-support/release/nix-build.nix @@ -47,15 +47,6 @@ stdenv.mkDerivation ( src=$(ls $src/tarballs/*.tar.bz2 $src/tarballs/*.tar.gz | sort | head -1) fi - # Hack to compress log files. Prevents (by pointer hiding!) - # unnecessary dependencies. - startLogWrite() { - # Use process substitution to send the FIFO output to both - # stdout and bzip2. - bash -c "tee >(bzip2 > \"$1\".bz2) < \"$2\"" & - logWriterPid=$! - } - # Set GCC flags for coverage analysis, if desired. if test -n "${toString doCoverageAnalysis}"; then export NIX_CFLAGS_COMPILE="-O0 -fprofile-arcs -ftest-coverage $NIX_CFLAGS_COMPILE" diff --git a/pkgs/build-support/release/make-source-tarball.nix b/pkgs/build-support/release/source-tarball.nix similarity index 94% rename from pkgs/build-support/release/make-source-tarball.nix rename to pkgs/build-support/release/source-tarball.nix index 731c29945275..be0345df9397 100644 --- a/pkgs/build-support/release/make-source-tarball.nix +++ b/pkgs/build-support/release/source-tarball.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation ( finalPhase = '' for i in $out/tarballs/*; do - echo "file source-dist $i" >> $out/nix-support/hydra-build-products + echo "file source-dist $i" >> $out/nix-support/hydra-build-products done # Try to figure out the release name. @@ -109,6 +109,10 @@ stdenv.mkDerivation ( meta = (if args ? meta then args.meta else {}) // { description = "Build of a source distribution from a checkout"; + + # Tarball builds are generally important, so give them a high + # default priority. + schedulingPriority = "200"; }; } diff --git a/pkgs/data/documentation/std-man-pages/default.nix b/pkgs/data/documentation/std-man-pages/default.nix new file mode 100644 index 000000000000..01572f6e00a8 --- /dev/null +++ b/pkgs/data/documentation/std-man-pages/default.nix @@ -0,0 +1,21 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "std-man-pages-4.2.2"; + + src = fetchurl { + url = mirror://gcc/libstdc++/doxygen/libstdc++-man-4.2.2.tar.bz2; + sha256 = "1572a5hlrj50gk03aardlrhhila0yjlvhqszl424297ga4g95mk2"; + }; + + installPhase = '' + ensureDir $out/share/man + cp -R * $out/share/man + ''; + + meta = { + description = "C++ STD manual pages"; + homepage = http://gcc.gnu.org/; + license = "GPL/LGPL"; + }; +} diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix new file mode 100644 index 000000000000..ed4cb09ebc77 --- /dev/null +++ b/pkgs/development/libraries/botan/default.nix @@ -0,0 +1,28 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.getAttr ["version"] "1.8.1" a; + buildInputs = with a; [ + perl + ]; +in +rec { + src = fetchurl { + url = "http://files.randombit.net/botan/Botan-${version}.tbz"; + sha256 = "1lgqkg7q0qpzh647zmzay149myrjihcx4jp3rrz6gw17rgn11v98"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall"]; + + configureCommand = "perl ./configure.pl"; + + name = "botan-" + version; + meta = { + description = "Cryptographic algorithms library"; + }; +} diff --git a/pkgs/development/libraries/lzo/default.nix b/pkgs/development/libraries/lzo/default.nix index 834b7abf5930..6ce1e786dbee 100644 --- a/pkgs/development/libraries/lzo/default.nix +++ b/pkgs/development/libraries/lzo/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation rec { - name = "lzo-2.02"; + name = "lzo-2.03"; src = fetchurl { url = "${meta.homepage}/download/${name}.tar.gz"; - sha256 = "1i9g9bdrmyn6546rnck3kkh8nssfaw75m2rxir4sn7bwvnsfryx2"; + sha256 = "8b1b0da8f757b9ac318e1c15a0eac8bdb56ca902a2dd25beda06c0f265f22591"; }; configureFlags = "--enable-shared --disable-static"; @@ -13,5 +13,6 @@ stdenv.mkDerivation rec { meta = { description = "A data compresion library suitable for real-time data de-/compression"; homepage = http://www.oberhumer.com/opensource/lzo; + license = "GPLv2+"; }; } diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index c0abe7900f9a..6e3d649fc202 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -16,7 +16,8 @@ stdenv.mkDerivation rec { ++ (if qt4Support then [qt4] else []); configureFlags = "--enable-shared --disable-static --enable-exceptions - --enable-cairo --enable-splash --enable-poppler-glib --enable-zlib " + --enable-cairo --enable-splash --enable-poppler-glib --enable-zlib + --enable-xpdf-headers " + (if qt4Support then "--enable-qt-poppler" else "--disable-qt-poppler"); patches = [ ./GDir-const.patch ./use_exceptions.patch ]; diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 838ecc49c053..e866a204ecf8 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, readline}: +{stdenv, fetchurl, readline, static ? false}: stdenv.mkDerivation rec { name = "sqlite-3.6.10"; @@ -12,7 +12,10 @@ stdenv.mkDerivation rec { buildInputs = [readline]; - configureFlags = "--disable-static --with-readline-inc=-I${readline}/include"; + configureFlags = '' + ${if static then "--disable-shared --enable-static" else "--disable-static"} + --with-readline-inc=-I${readline}/include + ''; postInstall = '' gcc -L$out/lib -I$out/include tool/genfkey.c -lsqlite3 -o $out/bin/genfkey diff --git a/pkgs/development/libraries/ucl/default.nix b/pkgs/development/libraries/ucl/default.nix new file mode 100644 index 000000000000..e9739d44bca4 --- /dev/null +++ b/pkgs/development/libraries/ucl/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "ucl-1.0.3"; + src = fetchurl { + url = http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz; + sha256 = "b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348"; + }; + + meta = { + homepage = http://www.oberhumer.com/opensource/ucl/; + description = "Portable lossless data compression library"; + license = "GPLv2"; + }; +} diff --git a/pkgs/development/libraries/wtk/builder.sh b/pkgs/development/libraries/wtk/builder.sh new file mode 100644 index 000000000000..bf65b96c7cac --- /dev/null +++ b/pkgs/development/libraries/wtk/builder.sh @@ -0,0 +1,42 @@ +source $stdenv/setup + +if ! test -e "$pathname"; then + echo "" + echo "SORRY!" + echo "You should download \`$(basename $pathname)' from Sun and place it in $(dirname $pathname)." + echo "Blame Sun, not us." + echo "" + exit 1 +fi + +actual=$(md5sum -b $pathname | cut -c1-32) +if test "$actual" != "$md5"; then + echo "hash is $actual, expected $md5" + exit 1 +fi + +mkdir unzipped +pushd unzipped +unzip $pathname || true +popd + +ensureDir $out +mv unzipped/* $out/ + +# Remove crap in the root directory. +for file in $out/* +do + if test -f $file ; then + rm $file + fi +done + +# Set the dynamic linker. +rpath= +for i in $libraries; do + rpath=$rpath${rpath:+:}$i/lib +done +find $out -type f -perm +100 \ + -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" {} \; +find $out -type f -perm +100 \ + -exec patchelf --set-rpath "$rpath" {} \; diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix new file mode 100644 index 000000000000..123d0a9216a1 --- /dev/null +++ b/pkgs/development/libraries/wtk/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, unzip, xlibs }: + +assert stdenv.system == "i686-linux"; + +stdenv.mkDerivation { + name = "sun-java-wtk-2.5.2_01"; + + pathname = "/tmp/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh"; + md5 = "6b70b6e6d426eac121db8a087991589f"; + + builder = ./builder.sh; + + buildInputs = [ unzip ]; + + libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.gcc.gcc ]; + + meta = { + homepage = http://java.sun.com/products/sjwtoolkit/download.html; + description = "Sun Java Wireless Toolkit 2.5.2_01 for CLDC"; + license = "unfree"; + }; +} diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix index 3afb4a826096..621cf5ce3f8a 100644 --- a/pkgs/development/libraries/wxGTK-2.8/default.nix +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -9,11 +9,11 @@ assert gtk.libpng != null; assert gtk.libpng.zlib != null; stdenv.mkDerivation { - name = "wxGTK-2.8.4"; + name = "wxGTK-2.8.10"; src = fetchurl { - url = mirror://sourceforge/wxwindows/wxGTK-2.8.4.tar.gz; - sha256 = "177hls125f3zjsymsww9jjkd2idb6jmp4ylwg94dsyzygsvyj58k"; + url = mirror://sourceforge/wxwindows/wxGTK-2.8.10.tar.gz; + sha256 = "1hygkrwa71kzdbz029igkxsqyb14y6vsllqafjgm9b7v91nq49r8"; }; buildInputs = [ diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix index 3aa6a9486a07..009c26933504 100644 --- a/pkgs/development/perl-modules/DBD-SQLite/default.nix +++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix @@ -16,4 +16,8 @@ buildPerlPackage { # Prevent segfaults in case of timeouts. ./reset.patch ]; + + # Disabled because the tests can randomly fail due to timeouts + # (e.g. "database is locked(5) at dbdimp.c line 402 at t/07busy.t"). + doCheck = false; } diff --git a/pkgs/development/tools/misc/xxdiff/3.2.nix b/pkgs/development/tools/misc/xxdiff/3.2.nix index 63d718b9d9a3..f4a0b8bebc43 100644 --- a/pkgs/development/tools/misc/xxdiff/3.2.nix +++ b/pkgs/development/tools/misc/xxdiff/3.2.nix @@ -30,7 +30,7 @@ rec { cd .. '') ["minInit" "doMake" "defEnsureDir" "addInputs"]; - name = "xxdiff" + version; + name = "xxdiff-" + version; meta = { description = "Interactive merge tool"; }; diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix index fd6dc825d1eb..c267b8f47fd3 100644 --- a/pkgs/development/tools/profiling/oprofile/default.nix +++ b/pkgs/development/tools/profiling/oprofile/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # FIXME: Add optional Qt support. buildInputs = [ binutils popt makeWrapper gawk which gnugrep ]; - configureFlags = "--with-kernel-support"; + configureFlags = "--with-kernel-support --disable-shared"; postInstall = '' wrapProgram "$out/bin/opcontrol" \ @@ -43,4 +43,4 @@ stdenv.mkDerivation rec { license = "GPLv2"; homepage = http://oprofile.sourceforge.net/; }; -} \ No newline at end of file +} diff --git a/pkgs/development/tools/selenium/remote-control/default.nix b/pkgs/development/tools/selenium/remote-control/default.nix index 4c55805e5c8c..83d81133a28d 100644 --- a/pkgs/development/tools/selenium/remote-control/default.nix +++ b/pkgs/development/tools/selenium/remote-control/default.nix @@ -1,23 +1,47 @@ args: with args; -stdenv.mkDerivation { - name = "selenium-rc-0.8.3-binary"; +# let version = "1.0-beta-2"; +let version = "1.0-SNAPSHOT-standalone"; +in stdenv.mkDerivation { + /* - src = fetchurl { - url = http://release.openqa.org/cgi-bin/selenium-remote-control-redirect.zip; - sha256 = "694b46a8440011bcedc4fdc6d01fd91c8b4b4b62b7c6629ace4e745ef47f583e"; - }; + Use this if there is another release.. - phases = "installPhase"; - installPhase = " - ensureDir \$out/lib - cp selenium-server-*/*.jar \$out/lib - "; + name = "selenium-remote-control-${version}-dist"; + src = fetchurl { + url = "http://release.seleniumhq.org/selenium-remote-control/${version}/selenium-remote-control-${version}-dist.zip"; + sha256 = "0ciyfqvnv0117l2rhw9dclv85mcf3czpimvybj38v3syl7m7yk41"; + }; + buildInputs = [unzip]; + phases = "unpackPhase buildPhase"; + buildPhase = '' + ensureDir $out/{bin,lib} + mv * $out/lib + bin="$out/bin/selenium-remote-control" + cat >> "$bin" << EOF + #!/bin/sh + exec ${jre}/bin/java -jar $out/lib/selenium-server-${version}/selenium-server.jar "\$@" + EOF + chmod +x "$bin" + ''; + */ - buildInputs = [unzip]; - - meta = { - description = "test tool for web applications"; - homepage = http://www.openqa.org/selenium-c; - license = ""; - }; + # this snapshot version starts a firefox from a script file. It only issues a warning about it + # you still have to pass -DfirefoxDefaultPath=/home/marc/.nix-profile/bin/firefox or such.. + name = "selenium-remote-control-${version}-dist"; + # this dist file has been created using mvn package -Dmaven.test.skip=true based on svn rev 2639 + src = fetchurl { + url = "http://mawercer.de/~nix/selenium-server-1.0-SNAPSHOT-standalone.jar"; + sha256 = "1g59g5y8lyjjj3fda30cm9gmjncdz70slrp03rqmnrkzp7z6khnc"; + }; + phases = "buildPhase"; + buildPhase = '' + ensureDir $out/{bin,lib} + cp $src $out/lib/ + bin="$out/bin/selenium-remote-control" + cat >> "$bin" << EOF + #!/bin/sh + exec ${jre}/bin/java -jar "$out/lib/$(basename $src)" "\$@" + EOF + chmod +x "$bin" + ''; } diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index dba58f007890..3be143d6a217 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -79,24 +79,49 @@ rec { /* Like `mapAttrs', except that it recursively applies itself to - values that attribute sets. Also, the first argument is a *list* - of the names of the containing attributes. + attribute sets. Also, the first argument of the argument + function is a *list* of the names of the containing attributes. + + Type: + mapAttrsRecursive :: + ([String] -> a -> b) -> AttrSet -> AttrSet Example: mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value])) { n = { a = "A"; m = { b = "B"; c = "C"; }; }; d = "D"; } => { n = { a = "n-a-A"; m = { b = "n-m-b-B"; c = "n-m-c-C"; }; }; d = "d-D"; } */ - mapAttrsRecursive = + mapAttrsRecursive = mapAttrsRecursiveCond (as: true); + + + /* Like `mapAttrsRecursive', but it takes an additional predicate + function that tells it whether to recursive into an attribute + set. If it returns false, `mapAttrsRecursiveCond' does not + recurse, but does apply the map function. It is returns true, it + does recurse, and does not apply the map function. + + Type: + mapAttrsRecursiveCond :: + (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet + + Example: + # To prevent recursing into derivations (which are attribute + # sets with the attribute "type" equal to "derivation"): + mapAttrsRecursiveCond + (as: !(as ? "type" && as.type == "derivation")) + (x: ... do something ...) + attrs + */ + mapAttrsRecursiveCond = cond: f: set: let - recurse = path: f: set: + recurse = path: set: let g = name: value: - if isAttrs value - then recurse (path ++ [name]) f value + if isAttrs value && cond value + then recurse (path ++ [name]) value else f (path ++ [name]) value; in mapAttrs g set; - in recurse []; + in recurse [] set; } diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix index 55d6a0d1b65f..a58539ee3c4d 100644 --- a/pkgs/lib/debug.nix +++ b/pkgs/lib/debug.nix @@ -14,27 +14,42 @@ rec { addErrorContextToAttrs = lib.mapAttrs (a : v : lib.addErrorContext "while evaluating ${a}" v); - debugVal = if builtins ? trace then x: (builtins.trace x x) else x: x; - debugXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x; + + traceVal = if builtins ? trace then x: (builtins.trace x x) else x: x; + traceXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x; + # this can help debug your code as well - designed to not produce thousands of lines - traceWhatis = x : __trace (whatis x) x; - traceMarked = str: x: __trace (str + (whatis x)) x; + traceShowVal = x : __trace (showVal x) x; + traceShowValMarked = str: x: __trace (str + showVal x) x; attrNamesToStr = a : lib.concatStringsSep "; " (map (x : "${x}=") (__attrNames a)); - whatis = x : - if (__isAttrs x) then - if (x ? outPath) then "x is a derivation, name ${if x ? name then x.name else ""}, { ${attrNamesToStr x} }" + showVal = x : + if __isAttrs x then + if x ? outPath then "x is a derivation, name ${if x ? name then x.name else ""}, { ${attrNamesToStr x} }" else "x is attr set { ${attrNamesToStr x} }" - else if (__isFunction x) then "x is a function" - else if (x == []) then "x is an empty list" - else if (__isList x) then "x is a list, first item is : ${whatis (__head x)}" - else if (x == true) then "x is boolean true" - else if (x == false) then "x is boolean false" - else if (x == null) then "x is null" + else if __isFunction x then "x is a function" + else if x == [] then "x is an empty list" + else if __isList x then "x is a list, first item is : ${showVal (__head x)}" + else if x == true then "x is boolean true" + else if x == false then "x is boolean false" + else if x == null then "x is null" else "x is probably a string starting, starting characters: ${__substring 0 50 x}.."; # trace the arguments passed to function and its result - traceCall = n : f : a : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); - traceCall2 = n : f : a : b : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); - traceCall3 = n : f : a : b : c : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); + traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); + traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); + traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); + + /* Evaluate a set of tests. A test is an attribute set {expr, + expected}, denoting an expression and its expected result. The + result is a list of failed tests, each represented as {name, + expected, actual}, denoting the attribute name of the failing + test and its expected and actual results. Used for regression + testing of the functions in lib; see tests.nix for an example. + */ + runTests = tests: lib.concatLists (lib.attrValues (lib.mapAttrs (name: test: + if ! lib.eqStrict test.expr test.expected + then [ { inherit name; expected = test.expected; result = test.expr; } ] + else [] ) tests)); + } diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 87789a196036..4777d7fb6685 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -6,12 +6,13 @@ let attrsets = import ./attrsets.nix; sources = import ./sources.nix; options = import ./options.nix; + meta = import ./meta.nix; debug = import ./debug.nix; misc = import ./misc.nix; in - { inherit trivial lists strings attrsets sources options debug; } + { inherit trivial lists strings attrsets sources options meta debug; } # !!! don't include everything at top-level; perhaps only the most # commonly used functions. // trivial // lists // strings // attrsets // sources // options - // debug // misc + // meta // debug // misc diff --git a/pkgs/lib/meta.nix b/pkgs/lib/meta.nix new file mode 100644 index 000000000000..56463361928f --- /dev/null +++ b/pkgs/lib/meta.nix @@ -0,0 +1,44 @@ +/* Some functions for manipulating meta attributes, as well as the + name attribute. */ + +rec { + + + /* Add to or override the meta attributes of the given + derivation. + + Example: + addMetaAttrs {description = "Bla blah";} somePkg + */ + addMetaAttrs = newAttrs: drv: + drv // { meta = (if drv ? meta then drv.meta else {}) // newAttrs; }; + + + /* Change the symbolic name of a package for presentation purposes + (i.e., so that nix-env users can tell them apart). + */ + setName = name: drv: drv // {inherit name;}; + + + /* Like `setName', but takes the previous name as an argument. + + Example: + updateName (oldName: oldName + "-experimental") somePkg + */ + updateName = updater: drv: drv // {name = updater (drv.name);}; + + + /* Append a suffix to the name of a package. !!! the suffix should + really be appended *before* the version, at least most of the + time. + */ + appendToName = suffix: updateName (name: "${name}-${suffix}"); + + + /* Decrease the nix-env priority of the package, i.e., other + versions/variants of the package will be preferred. + */ + lowPrio = drv: addMetaAttrs { priority = "10"; } drv; + + +} diff --git a/pkgs/lib/misc-tests.nix b/pkgs/lib/misc-tests.nix deleted file mode 100644 index f8deb1b1a8ab..000000000000 --- a/pkgs/lib/misc-tests.nix +++ /dev/null @@ -1,53 +0,0 @@ -let lib = import ./default.nix; - - eqStrictTest = - let inherit(lib) eqStrict; in - assert eqStrict 2 2; - assert !(eqStrict 3 2); - assert eqStrict [2 1] [2 1]; - assert !(eqStrict [1 3] [1 2]); - assert eqStrict {a = 7; b = 20;} {b= 20; a = 7;}; - assert eqStrict [{a = 7; b = 20;}] [{b= 20; a = 7;}]; - assert eqStrict {a = [7 8]; b = 20;} {b= 20; a = [7 8];}; - "ok"; - - overridableDelayableArgsTest = - let inherit (lib) defaultOverridableDelayableArgs; - res1 = defaultOverridableDelayableArgs lib.id {}; - res2 = defaultOverridableDelayableArgs lib.id { a = 7; }; - res3 = let x = defaultOverridableDelayableArgs lib.id { a = 7; }; - in (x.merge) { b = 10; }; - res4 = let x = defaultOverridableDelayableArgs lib.id { a = 7; }; - in (x.merge) ( x: { b = 10; }); - res5 = let x = defaultOverridableDelayableArgs lib.id { a = 7; }; - in (x.merge) ( x: { a = __add x.a 3; }); - res6 = let x = defaultOverridableDelayableArgs lib.id { a = 7; mergeAttrBy = { a = __add; }; }; - y = x.merge {}; - in (y.merge) { a = 10; }; - - resRem7 = res6.replace (a : removeAttrs a ["a"]); - - resReplace6 = let x = defaultOverridableDelayableArgs lib.id { a = 7; mergeAttrBy = { a = __add; }; }; - x2 = x.merge { a = 20; }; # now we have 27 - in (x2.replace) { a = 10; }; # and override the value by 10 - - # fixed tests (delayed args): (when using them add some comments, please) - resFixed1 = - let x = defaultOverridableDelayableArgs lib.id ( x : { a = 7; c = x.fixed.b; }); - y = x.merge (x : { name = "name-${builtins.toString x.fixed.c}"; }); - in (y.merge) { b = 10; }; - strip = attrs : removeAttrs attrs ["merge" "replace"]; - - in - assert lib.eqStrict (strip res1) { }; - assert lib.eqStrict (strip res2) { a = 7; }; - assert lib.eqStrict (strip res3) { a = 7; b = 10; }; - assert lib.eqStrict (strip res4) { a = 7; b = 10; }; - assert lib.eqStrict (strip res5) { a = 10; }; - assert lib.eqStrict (strip res6) { a = 17; }; - assert lib.eqStrict (strip resRem7) {}; - assert lib.eqStrict (strip resFixed1) { a = 7; b = 10; c =10; name = "name-10"; }; - "ok"; - - -in [ eqStrictTest overridableDelayableArgsTest ] diff --git a/pkgs/lib/tests.nix b/pkgs/lib/tests.nix index 2e75d7f141fa..395b4b3e17b3 100644 --- a/pkgs/lib/tests.nix +++ b/pkgs/lib/tests.nix @@ -1,8 +1,102 @@ -let lib = import ./default.nix; +with import ./default.nix; - miscTests = import ./misc-tests.nix; +runTests { -in - if lib.all (a : a == "ok") (lib.concatLists [ miscTests ]) then - throw "all tests have passed" - else "there has been a some lib test failures" + id = { + expr = id 1; + expected = 1; + }; + + const = { + expr = const 2 3; + expected = 2; + }; + + or = { + expr = or true false; + expected = true; + }; + + and = { + expr = and true false; + expected = false; + }; + + fix = { + expr = fix (x: {a = if x ? a then "a" else "b";}); + expected = {a = "a";}; + }; + + concatMapStrings = { + expr = concatMapStrings (x: x + ";") ["a" "b" "c"]; + expected = "a;b;c;"; + }; + + concatStringsSep = { + expr = concatStringsSep "," ["a" "b" "c"]; + expected = "a,b,c"; + }; + + filter = { + expr = filter (x: x != "a") ["a" "b" "c" "a"]; + expected = ["b" "c"]; + }; + + fold = { + expr = fold (builtins.add) 0 (range 0 100); + expected = 5050; + }; + + eqStrict = { + expr = all id [ + (eqStrict 2 2) + (!eqStrict 3 2) + (eqStrict [2 1] [2 1]) + (!eqStrict [1 3] [1 2]) + (eqStrict {a = 7; b = 20;} {b= 20; a = 7;}) + (eqStrict [{a = 7; b = 20;}] [{b= 20; a = 7;}]) + (eqStrict {a = [7 8]; b = 20;} {b= 20; a = [7 8];}) + ]; + expected = true; + }; + + overridableDelayableArgsTest = { + expr = + let res1 = defaultOverridableDelayableArgs id {}; + res2 = defaultOverridableDelayableArgs id { a = 7; }; + res3 = let x = defaultOverridableDelayableArgs id { a = 7; }; + in (x.merge) { b = 10; }; + res4 = let x = defaultOverridableDelayableArgs id { a = 7; }; + in (x.merge) ( x: { b = 10; }); + res5 = let x = defaultOverridableDelayableArgs id { a = 7; }; + in (x.merge) ( x: { a = __add x.a 3; }); + res6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = __add; }; }; + y = x.merge {}; + in (y.merge) { a = 10; }; + + resRem7 = res6.replace (a : removeAttrs a ["a"]); + + resReplace6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = __add; }; }; + x2 = x.merge { a = 20; }; # now we have 27 + in (x2.replace) { a = 10; }; # and override the value by 10 + + # fixed tests (delayed args): (when using them add some comments, please) + resFixed1 = + let x = defaultOverridableDelayableArgs id ( x : { a = 7; c = x.fixed.b; }); + y = x.merge (x : { name = "name-${builtins.toString x.fixed.c}"; }); + in (y.merge) { b = 10; }; + strip = attrs : removeAttrs attrs ["merge" "replace"]; + in all id + [ (eqStrict (strip res1) { }) + (eqStrict (strip res2) { a = 7; }) + (eqStrict (strip res3) { a = 7; b = 10; }) + (eqStrict (strip res4) { a = 7; b = 10; }) + (eqStrict (strip res5) { a = 10; }) + (eqStrict (strip res6) { a = 17; }) + (eqStrict (strip resRem7) {}) + (eqStrict (strip resFixed1) { a = 7; b = 10; c =10; name = "name-10"; }) + ]; + expected = true; + }; + +} diff --git a/pkgs/misc/bleeding-edge-fetch-infos.nix b/pkgs/misc/bleeding-edge-fetch-infos.nix index e398fd08b7f5..0752b54218fd 100644 --- a/pkgs/misc/bleeding-edge-fetch-infos.nix +++ b/pkgs/misc/bleeding-edge-fetch-infos.nix @@ -127,9 +127,9 @@ url = http://mawercer.de/~nix/repos/syb_with_class.tar.gz; sha256 = "f67c979bb980e69856f26f89b9bdcb5cf962e4db0b1fb859f53928c2d6b45f5b"; }; - synergy = args: with args; fetchurl { - url = http://mawercer.de/~nix/repos/synergy.tar.gz; - sha256 = "c86dde2f10e7071d823cff542ea6c98a7e29a45e4909034edbd7605caa775a47"; + synergy = args: with args; fetchurl { # Mon Mar 30 10:08:36 CEST 2009 + url = "http://mawercer.de/~nix/repos/synergy-F_10-08-35.tar.gz"; + sha256 = "764b88b69f342017094380f62099f4a0dfdcddb6a289abb6b646f7ac2f37d675"; }; takusen = args: with args; fetchurl { url = http://mawercer.de/~nix/repos/takusen.tar.gz; diff --git a/pkgs/misc/maven/maven-2.nix b/pkgs/misc/maven/maven-2.nix index be84f212e8b0..5dc46cf5de8f 100644 --- a/pkgs/misc/maven/maven-2.nix +++ b/pkgs/misc/maven/maven-2.nix @@ -1,13 +1,15 @@ args: with args; stdenv.mkDerivation { - name = "maven-2.0.8-bin"; + name = "maven-2.1.0-bin"; src = fetchurl { # TODO mirrors - url = http://apache.linux-mirror.org/maven/binaries/apache-maven-2.0.8-bin.tar.bz2; - sha256 = "1wasvqplw7xk04j38vsq94zbrlpdg2k4348bg8730snr6zgaasai"; + url = http://apache.mirroring.de/maven/binaries/apache-maven-2.1.0-bin.zip; + sha256 = "13xda2l05pqs7x8ig85i9dqbdbv970zfgqif4wgjz8nn36jbxpvd"; }; + buildInputs = [ unzip ]; + phases = "unpackPhase installPhase"; installPhase = " diff --git a/pkgs/misc/ntfs-3g/default.nix b/pkgs/misc/ntfs-3g/default.nix index ea2b60a613d7..a8c9af6271f9 100644 --- a/pkgs/misc/ntfs-3g/default.nix +++ b/pkgs/misc/ntfs-3g/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "ntfs-3g"; - version = "2009.1.1"; + version = "2009.2.1"; name = "${pname}-${version}"; src = fetchurl { url = "${meta.homepage}/${name}.tgz"; - sha256 = "0e02ff891645658c1801ba7d665c0ff3a4231e5570b974a803ffc2974ef68e45"; + sha256 = "1c3qhn0i5hlyk9dky5a4jnbfkyz73d3qpymblc8mhhx642nigbj7"; }; preConfigure = '' diff --git a/pkgs/misc/ntfsprogs/default.nix b/pkgs/misc/ntfsprogs/default.nix index 8f2e68393090..3deb668eddb2 100644 --- a/pkgs/misc/ntfsprogs/default.nix +++ b/pkgs/misc/ntfsprogs/default.nix @@ -1,16 +1,23 @@ -args: with args; -args.stdenv.mkDerivation { +{stdenv, fetchurl, libuuid}: + +stdenv.mkDerivation rec { name = "ntfsprogs-2.0.0"; src = fetchurl { - name = "ntfsprogs-2.0.0.tar.bz2"; - url = "http://garr.dl.sourceforge.net/sourceforge/linux-ntfs/ntfsprogs-2.0.0.tar.bz2"; + url = "mirror://sourceforge/linux-ntfs/${name}.tar.bz2"; sha256 = "ad36e19706c7303b10aa0a9bf2c2dd0309b91cd0171f1c9eb361d94a85017432"; }; + buildInputs = [libuuid]; + + preConfigure = + '' + substituteInPlace ntfsprogs/Makefile.in --replace /sbin $out/sbin + ''; + meta = { - description = "ntfs utilities"; - homepage = http://sourceforge.net/projects/linux-ntfs; - license = "GPL"; + description = "Utilities for the NTFS filesystem"; + homepage = http://sourceforge.net/projects/linux-ntfs; + license = "GPL"; }; } diff --git a/pkgs/os-specific/linux/fuse/default.nix b/pkgs/os-specific/linux/fuse/default.nix index 7e3bb66b16ff..fc3bcf5a9d26 100644 --- a/pkgs/os-specific/linux/fuse/default.nix +++ b/pkgs/os-specific/linux/fuse/default.nix @@ -1,14 +1,18 @@ args: with args; stdenv.mkDerivation { - name = "fuse-2.7.2"; + name = "fuse-2.7.4"; + builder = ./builder.sh; + src = fetchurl { - url = mirror://sourceforge/fuse/fuse-2.7.2.tar.gz; - sha256 = "1zxssdiirf19mihbnxpy0kiix35d4256b9lani7qwqi7m940jfgv"; + url = mirror://sourceforge/fuse/fuse-2.7.4.tar.gz; + sha256 = "1rj9xn6ynbcqp6n5pf54jcyq13viij0jhv7adv89pq6lwpn71c68"; }; - configureFlags = [ "--disable-kernel-module"]; - buildInputs = [ utillinux ]; + + configureFlags = "--disable-kernel-module"; + + buildInputs = [utillinux]; inherit utillinux; diff --git a/pkgs/os-specific/linux/gw6c/5.1.nix b/pkgs/os-specific/linux/gw6c/default.nix similarity index 83% rename from pkgs/os-specific/linux/gw6c/5.1.nix rename to pkgs/os-specific/linux/gw6c/default.nix index 68797e3d26f3..a11037c0ebed 100644 --- a/pkgs/os-specific/linux/gw6c/5.1.nix +++ b/pkgs/os-specific/linux/gw6c/default.nix @@ -1,9 +1,10 @@ args : with args; +let version = "6.0"; in rec { src = fetchurl { - url = http://go6.net/4105/file.asp?file_id=150; - sha256 = "07svw71wad1kwip7vnsdwcvlhhknqlx8v8kmdnrw11f6xg76w2ln"; - name = "gateway6-client-5.1.tar.gz"; + url = http://go6.net/4105/file.asp?file_id=158; + sha256 = "0cnxqyw8rdr0sii77n2pv97f0c00dx6ykvnb3mf2acyrarh04nq8"; + name = "gateway6-client-${version}.tar.gz"; }; buildInputs = [nettools openssl procps]; @@ -14,7 +15,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["preBuild" "doMakeInstall"]; - goSrcDir = "cd ../tspc-advanced"; + goSrcDir = "cd tspc-advanced"; preBuild = FullDepEntry ('' sed -e 's@/dev/net/tun@/dev/tun@' -i platform/linux/tsp_tun.c; diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.27.nix b/pkgs/os-specific/linux/kernel/linux-2.6.27.nix index dfb704bc8297..d7f2246d8c68 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.27.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.27.nix @@ -5,11 +5,11 @@ assert !userModeLinux; import ./generic.nix ( rec { - version = "2.6.27.19"; + version = "2.6.27.21"; src = fetchurl { url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2"; - sha256 = "1xkl5dfj7lrdp4p0sjxi11qwzhjbxj08ww5hd70xfhsqyllrgzh9"; + sha256 = "104lyf7hqmiamkp6qfs42mh186vh97ljvblmhqr06wa91iml93fy"; }; features = { diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix index 9982028b279d..b153dc9d33fd 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix @@ -5,11 +5,11 @@ assert !userModeLinux; import ./generic.nix ( rec { - version = "2.6.28.7"; + version = "2.6.28.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2"; - sha256 = "1bck0gmkbrgskb5269j0sw5ww4103pfq83c0xzwmmznbfl6c9xls"; + sha256 = "09rpfghjl2h50ccnp1yr9i466kfgh868g3433c0fqwf7kaqlalwc"; }; features = { diff --git a/pkgs/os-specific/linux/nvidia/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh similarity index 100% rename from pkgs/os-specific/linux/nvidia/builder.sh rename to pkgs/os-specific/linux/nvidia-x11/builder.sh diff --git a/pkgs/os-specific/linux/nvidia/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix similarity index 67% rename from pkgs/os-specific/linux/nvidia/default.nix rename to pkgs/os-specific/linux/nvidia-x11/default.nix index 0b4d8b8988ed..77d6d306c017 100644 --- a/pkgs/os-specific/linux/nvidia/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -2,7 +2,7 @@ let - versionNumber = "180.29"; + versionNumber = "180.44"; in @@ -14,13 +14,13 @@ stdenv.mkDerivation { src = if stdenv.system == "i686-linux" then fetchurl { - url = "ftp://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; - sha256 = "17wgg5rf5384bxng9ygwarf4imvvg069zihfvvvmahg1b0fsipvq"; + url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; + sha256 = "00da9nr4hspyjnl5rx1flz845wi7jk40ba43wswzix9cfx920vbj"; } else if stdenv.system == "x86_64-linux" then fetchurl { - url = "ftp://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run"; - sha256 = "1w7a67s5df8i5lbr2r980l674wvrqzzys1zdwcla267zy109rp5d"; + url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run"; + sha256 = "1x1pa8w8v4vciinr5ismp7zfl3nsn7x0k5n8m6r1cql6i0rxxgsy"; } else throw "nvidia-x11 does not support platform ${stdenv.system}"; diff --git a/pkgs/os-specific/linux/util-linux-ng/default.nix b/pkgs/os-specific/linux/util-linux-ng/default.nix index 8c77cf297af3..aa0b99a25269 100644 --- a/pkgs/os-specific/linux/util-linux-ng/default.nix +++ b/pkgs/os-specific/linux/util-linux-ng/default.nix @@ -12,11 +12,11 @@ }: stdenv.mkDerivation { - name = (if buildMountOnly then "mount-" else "") + "util-linux-ng-2.14.1"; + name = (if buildMountOnly then "mount-" else "") + "util-linux-ng-2.14.2"; src = fetchurl { - url = mirror://kernel/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.1.tar.bz2; - sha256 = "0b40xwdqpp16fcy1vfzqigl41d9slq32kzv2jr6nfy5bk59rqa5z"; + url = mirror://kernel/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.2.tar.bz2; + sha256 = "03k3w0f1ljwvv31glnxkk1f66fzyw0wdshgqxz0aixh7l3ln73hh"; }; configureFlags = '' diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix deleted file mode 100644 index d9fd0028c799..000000000000 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ stdenv, fetchurl, ncurses ? null - -, # Build mount/umount only. - buildMountOnly ? false - -, # A directory containing mount helpers programs - # (i.e. `mount.') to be used instead of /sbin. - mountHelpers ? null -}: - -stdenv.mkDerivation { - name = (if buildMountOnly then "mount-" else "") + "util-linux-2.13-pre7"; - - src = fetchurl { - url = mirror://kernel/linux/utils/util-linux/testing/util-linux-2.13-pre7.tar.bz2; - md5 = "13cdf4b76533e8421dc49de188f85291"; - }; - - patches = [ - # Fix for a local root exploit via mount/umount - # (http://www.gentoo.org/security/en/glsa/glsa-200710-18.xml). - (fetchurl { - url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-setuid-checks.patch?rev=1.1"; - sha256 = "02ky7ljzqpx8ii3dfmjydw8nnhshpw2inwh6w1vqllz8mhn81jdf"; - }) - ]; - - configureFlags = "--disable-use-tty-group"; - - buildInputs = stdenv.lib.optional (ncurses != null) ncurses; - - inherit mountHelpers; - - preConfigure = '' - makeFlagsArray=(usrbinexecdir=$out/bin usrsbinexecdir=$out/sbin datadir=$out/share exampledir=$out/share/getopt) - if test -n "$mountHelpers"; then - substituteInPlace mount/mount.c --replace /sbin/mount. $mountHelpers/mount. - substituteInPlace mount/umount.c --replace /sbin/umount. $mountHelpers/umount. - fi - ''; - - buildPhase = - if buildMountOnly then '' - make "''${makeFlagsArray[@]}" -C lib - make "''${makeFlagsArray[@]}" -C mount - '' else ""; - - installPhase = - if buildMountOnly then '' - make "''${makeFlagsArray[@]}" -C lib install - make "''${makeFlagsArray[@]}" -C mount install - '' else ""; - - # Hack to get static builds to work. - NIX_CFLAGS_COMPILE = "-DHAVE___PROGNAME=1"; -} diff --git a/pkgs/servers/ftp/vsftpd/builder.sh b/pkgs/servers/ftp/vsftpd/builder.sh deleted file mode 100644 index 76f361d97b10..000000000000 --- a/pkgs/servers/ftp/vsftpd/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -ensureDir "$out/bin" -ensureDir "$out/sbin" - -ensureDir "$out/man/man8" -ensureDir "$out/man/man5" - -genericBuild diff --git a/pkgs/servers/ftp/vsftpd/default.nix b/pkgs/servers/ftp/vsftpd/default.nix index 7961448428dd..10e6d6587140 100644 --- a/pkgs/servers/ftp/vsftpd/default.nix +++ b/pkgs/servers/ftp/vsftpd/default.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation rec { ''; patches = [ ./fix.patch ] ; - preConfigure = ''sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h''; - buildInputs = [ openssl libcap pam ]; + preConfigure = ''sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h; + sed -i "s@/etc/vsftpd.user_list@$out/vsftpd.user_list@" vsftpd.conf.5 tunables.c''; + + configFile = ./vsftpd.user_list; + postInstall = "cp ${./vsftpd.user_list} $out/vsftpd.user_list"; + + buildInputs = [ openssl libcap pam configFile ]; } diff --git a/pkgs/servers/ftp/vsftpd/vsftpd.user_list b/pkgs/servers/ftp/vsftpd/vsftpd.user_list new file mode 100644 index 000000000000..4200a1e93447 --- /dev/null +++ b/pkgs/servers/ftp/vsftpd/vsftpd.user_list @@ -0,0 +1,3 @@ +#list users here that can (not) connect to vsftpd (only needed when userlistenable=true) + +raidbackup diff --git a/pkgs/servers/samba/default.nix b/pkgs/servers/samba/default.nix index d0da8808da79..708947154e66 100644 --- a/pkgs/servers/samba/default.nix +++ b/pkgs/servers/samba/default.nix @@ -6,8 +6,8 @@ stdenv.mkDerivation rec { name = "samba-3.2.7"; src = fetchurl { - url = http://us3.samba.org/samba/ftp/stable/samba-3.2.7.tar.gz; - sha256 = "18q4q1ay9dsk3djl1s2ibj51n8c111y05h5dsc2ssl2wg32vhasg"; + url = http://us3.samba.org/samba/ftp/stable/samba-3.3.2.tar.gz; + sha256 = "1b4fa9fbe7ccced6cca449c4b0b9fba65ffd2ad63b1f0bf2507e943281461477"; }; buildInputs = [readline pam openldap kerberos popt iniparser libunwind fam acl]; diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index ff4de11bc8b7..5be18ae205ae 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -107,5 +107,18 @@ rec { isStatic = true; } // {inherit fetchurl;}; - -} \ No newline at end of file + + /* Modify a stdenv so that the specified attributes are added to + every derivation returned by its mkDerivation function. + + Example: + stdenvNoOptimise = + addAttrsToDerivation + { NIX_CFLAGS_COMPILE = "-O0"; } + stdenv; + */ + addAttrsToDerivation = extraAttrs: stdenv: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // extraAttrs); }; + + +} diff --git a/pkgs/tools/compression/lzop/default.nix b/pkgs/tools/compression/lzop/default.nix new file mode 100644 index 000000000000..c15a34ca6f6e --- /dev/null +++ b/pkgs/tools/compression/lzop/default.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, lzo}: + +stdenv.mkDerivation { + name = "lzop-1.02rc1"; + src = fetchurl { + url = http://www.lzop.org/download/lzop-1.02rc1.tar.gz; + sha256 = "1dc32bfd82b130727bcec1de3b8a7cf090b78b3f14981d375ceb862b1e0e6873"; + }; + + buildInputs = [ lzo ]; + + meta = { + homepage = http://www.lzop.org; + description = "Fast file compressor"; + license = "GPL"; + }; +} diff --git a/pkgs/tools/compression/upx/default.nix b/pkgs/tools/compression/upx/default.nix new file mode 100644 index 000000000000..a0d474a6d387 --- /dev/null +++ b/pkgs/tools/compression/upx/default.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, ucl, zlib}: + +stdenv.mkDerivation { + name = "upx-3.03"; + src = fetchurl { + url = http://upx.sourceforge.net/download/upx-3.03-src.tar.bz2; + sha256 = "a04b0decd01d3ca194b9553c7bbf8a01bc17e0e06eb0850f4271bba783143d7b"; + }; + buildInputs = [ ucl zlib ]; + + preConfigure = "cd src"; + + installPhase = "ensureDir $out/bin ; cp upx.out $out/bin/upx"; + + meta = { + homepage = http://upx.sourceforge.net/; + description = "The Ultimate Packer for eXecutables"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/tools/misc/pv/default.nix b/pkgs/tools/misc/pv/default.nix new file mode 100644 index 000000000000..2e5d7c90dedf --- /dev/null +++ b/pkgs/tools/misc/pv/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl } : + +stdenv.mkDerivation { + name = "pv-1.1.4"; + + src = fetchurl { + url = http://pipeviewer.googlecode.com/files/pv-1.1.4.tar.bz2; + sha256 = "c8613c240ab4297f6ad346f0047138f551a093c603eeb581d5e83091cad3a559"; + }; + + meta = { + homepage = http://www.ivarch.com/programs/pv; + description = "Tool for monitoring the progress of data through a pipeline"; + license = "free"; + }; +} diff --git a/pkgs/tools/misc/rrdtool/default.nix b/pkgs/tools/misc/rrdtool/default.nix new file mode 100644 index 000000000000..e5e196efdb0e --- /dev/null +++ b/pkgs/tools/misc/rrdtool/default.nix @@ -0,0 +1,16 @@ +{ fetchurl, stdenv, gettext, perl, pkgconfig, libxml2, pango, cairo }: + +stdenv.mkDerivation { + name = "rrdtool-1.3.6"; + src = fetchurl { + url = http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.6.tar.gz; + sha256 = "e958760cb0d182c53a878cb2ba5c290c252c2c506082c988e5dd3f3301b895a2"; + }; + buildInputs = [ gettext perl pkgconfig libxml2 pango cairo ]; + + meta = { + homepage = http://oss.oetiker.ch/rrdtool/; + description = "High performance logging in Round Robin Databases"; + license = "GPL"; + }; +} diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix index 56da6c3ce3d8..96696f8d9528 100644 --- a/pkgs/tools/networking/ntp/default.nix +++ b/pkgs/tools/networking/ntp/default.nix @@ -2,12 +2,12 @@ assert stdenv.isLinux -> libcap != null; -stdenv.mkDerivation { - name = "ntp-4.2.4p5"; +stdenv.mkDerivation rec { + name = "ntp-4.2.4p6"; src = fetchurl { - url = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.4p5.tar.gz; - sha256 = "066x8gm55cziyc86ciwdq68y2xqfbbqqh8417nkwd1jmrihfmjvl"; + url = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${name}.tar.gz"; + sha256 = "0rqhcmb9rjdl0hkvxyabnmlrzgvvw2f16k7mi9b4qskwgh340xk4"; }; configureFlags = '' @@ -15,7 +15,7 @@ stdenv.mkDerivation { ${if stdenv.isLinux then "--enable-linuxcaps" else ""} ''; - buildInputs = if stdenv.isLinux then [libcap] else []; + buildInputs = stdenv.lib.optional stdenv.isLinux libcap; meta = { homepage = http://www.ntp.org/; diff --git a/pkgs/tools/networking/pdsh/default.nix b/pkgs/tools/networking/pdsh/default.nix index d920816c1414..7e60e60bfa36 100644 --- a/pkgs/tools/networking/pdsh/default.nix +++ b/pkgs/tools/networking/pdsh/default.nix @@ -1,7 +1,7 @@ -{stdenv, fetchurl, perl, readline, ssh, pam}: +{stdenv, fetchurl, perl, readline, rsh, ssh, pam}: stdenv.mkDerivation rec { - name = "pdsh-2.16"; + name = "pdsh-2.18"; meta = { homepage = "https://computing.llnl.gov/linux/pdsh.html"; description = "A high-performance, parallel remote shell utility."; @@ -9,9 +9,8 @@ stdenv.mkDerivation rec { }; src = fetchurl { url = "mirror://sourceforge/pdsh/${name}.tar.bz2"; - sha256 = "8891cd3b175d3075f7c71fa4ee2b077306117ada5dd8c0966caaa3b74eca3a3e"; + sha256 = "8c94acb17b4af8a9f553db180b4d5745c9c98844a5dc070e2ce80590e8e8a539"; }; - patches = [ ./fix-missing-sys-types-h.patch ]; buildInputs = [perl readline ssh pam]; # Setting --with-machines=$out in configureFlags doesn't seem to work, # so I specify configurePhase instead. @@ -19,6 +18,7 @@ stdenv.mkDerivation rec { + " " + (if readline == null then "--without-readline" else "--with-readline") + " " + (if ssh == null then "--without-ssh" else "--with-ssh") + " " + (if pam == null then "--without-pam" else "--with-pam") + + " " + (if rsh == null then "--without-rsh" else "--with-rsh") + " --with-dshgroups" + " --with-xcpu" + " --without-genders" diff --git a/pkgs/tools/networking/pdsh/fix-missing-sys-types-h.patch b/pkgs/tools/networking/pdsh/fix-missing-sys-types-h.patch deleted file mode 100644 index 6077e4e755cf..000000000000 --- a/pkgs/tools/networking/pdsh/fix-missing-sys-types-h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pdsh-2.16/src/common/hostlist.h 2008-01-29 18:35:48.000000000 +0100 -+++ pdsh-2.16-patched/src/common/hostlist.h 2008-07-07 21:14:12.000000000 +0200 -@@ -29,6 +29,8 @@ - #ifndef _HOSTLIST_H - #define _HOSTLIST_H - -+#include -+ - /* Notes: - * - * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index f7a8321fe317..fe8f20bb456a 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -1,13 +1,27 @@ {stdenv, fetchurl, gettext}: +assert stdenv.isLinux; + stdenv.mkDerivation { - name = "checkinstall-1.6.1"; + name = "checkinstall-1.6.2pre20081116"; src = fetchurl { - url = http://checkinstall.izto.org/files/source/checkinstall-1.6.1.tgz; - sha256 = "0p6gbbnk4hjwkmv8dr7c4v5wpdnanczavi7yiiivvf45zyfl8lil"; + url = http://nixos.org/tarballs/checkinstall-1.6.2pre20081116.tar.bz2; + sha256 = "0k8i551rcn2g0jxskq2sgy4m85irdf5zsl2q4w9b7npgnybkzsmb"; }; + patches = [ + # Include empty directories created by the installation script in + # generated packages. (E.g., if a `make install' does `mkdir + # /var/lib/mystuff', then /var/lib/mystuff should be included in + # the package.) + ./empty-dirs.patch + + # Implement the getxattr(), lgetxattr(), __open_2() and + # __open64_2() functions. Needed for doing builds on Ubuntu 8.10. + ./missing-functions.patch + ]; + buildInputs = [gettext]; preBuild = '' @@ -15,23 +29,18 @@ stdenv.mkDerivation { substituteInPlace checkinstall --replace /usr/local/lib/checkinstall $out/lib/checkinstall substituteInPlace checkinstallrc-dist --replace /usr/local $out + + substituteInPlace installwatch/create-localdecls \ + --replace /usr/include/unistd.h ${stdenv.glibc}/include/unistd.h ''; postInstall = - if stdenv.isLinux then - # Clear the RPATH, otherwise installwatch.so won't work properly - # as an LD_PRELOADed library on applications that load against a - # different Glibc. - '' - patchelf --set-rpath "" $out/lib/installwatch.so - '' - else ""; - - patches = [ - # Necessary for building on x86_64, see - # http://checkinstall.izto.org/cklist/msg00256.html - ./readlink.patch - ]; + # Clear the RPATH, otherwise installwatch.so won't work properly + # as an LD_PRELOADed library on applications that load against a + # different Glibc. + '' + patchelf --set-rpath "" $out/lib/installwatch.so + ''; meta = { homepage = http://checkinstall.izto.org/; diff --git a/pkgs/tools/package-management/checkinstall/empty-dirs.patch b/pkgs/tools/package-management/checkinstall/empty-dirs.patch new file mode 100644 index 000000000000..9a3e29c84c12 --- /dev/null +++ b/pkgs/tools/package-management/checkinstall/empty-dirs.patch @@ -0,0 +1,49 @@ +diff -rc checkinstall-orig/checkinstall checkinstall/checkinstall +*** checkinstall-orig/checkinstall 2009-03-12 13:40:24.000000000 +0100 +--- checkinstall/checkinstall 2009-03-27 14:51:55.000000000 +0100 +*************** +*** 1635,1644 **** + + # Find regular files first + [ $DEBUG -gt 0 ] && echo "debug: BASE_TMP_DIR: $BASE_TMP_DIR" +! cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access)' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles + + # symlinks are next +! cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access)' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u >> /${TMP_DIR}/newfiles + # Create another list of modified files that exclude all files the + # install script wanted to create but did not, e.g because they already + # existed. +--- 1635,1648 ---- + + # Find regular files first + [ $DEBUG -gt 0 ] && echo "debug: BASE_TMP_DIR: $BASE_TMP_DIR" +! cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access|mkdir)' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles + + # symlinks are next +! cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access|mkdir)' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u >> /${TMP_DIR}/newfiles +! +! # And finally newly created directories. +! cat /${TMP_DIR}/newfiles.tmp | egrep '^0[[:space:]]+mkdir[[:space:]]+' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u >> /${TMP_DIR}/newfiles +! + # Create another list of modified files that exclude all files the + # install script wanted to create but did not, e.g because they already + # existed. +*************** +*** 1738,1746 **** + cd / + + ( cat /${TMP_DIR}/newfiles | while read i; do +! if [ ! -d "${TRANSLROOT}${i}" -o -L "${TRANSLROOT}${i}" ]; then +! echo ".${i}" +! fi + done ) > /${TMP_DIR}/newfiles-tar + + # Here it gets tricky: we need to copy all new files to our build dir, +--- 1742,1748 ---- + cd / + + ( cat /${TMP_DIR}/newfiles | while read i; do +! echo ".${i}" + done ) > /${TMP_DIR}/newfiles-tar + + # Here it gets tricky: we need to copy all new files to our build dir, diff --git a/pkgs/tools/package-management/checkinstall/missing-functions.patch b/pkgs/tools/package-management/checkinstall/missing-functions.patch new file mode 100644 index 000000000000..02066134b2ed --- /dev/null +++ b/pkgs/tools/package-management/checkinstall/missing-functions.patch @@ -0,0 +1,162 @@ +diff -rc checkinstall-orig/installwatch/installwatch.c checkinstall/installwatch/installwatch.c +*** checkinstall-orig/installwatch/installwatch.c 2009-03-12 13:40:24.000000000 +0100 +--- checkinstall/installwatch/installwatch.c 2009-03-27 22:42:19.000000000 +0100 +*************** +*** 110,115 **** +--- 110,117 ---- + static int (*true_setxattr)(const char *,const char *,const void *, + size_t, int); + static int (*true_removexattr)(const char *,const char *); ++ static ssize_t (*true_getxattr)(const char *,const char *,const void *,size_t); ++ static ssize_t (*true_lgetxattr)(const char *,const char *,const void *,size_t); + + #if(GLIBC_MINOR >= 1) + +*************** +*** 369,374 **** +--- 371,378 ---- + true_unlink = dlsym(libc_handle, "unlink"); + true_utime = dlsym(libc_handle, "utime"); + true_setxattr = dlsym(libc_handle, "setxattr"); ++ true_getxattr = dlsym(libc_handle, "getxattr"); ++ true_lgetxattr = dlsym(libc_handle, "lgetxattr"); + true_utimes = dlsym(libc_handle, "utimes"); + true_access = dlsym(libc_handle, "access"); + +*************** +*** 3494,3499 **** +--- 3498,3587 ---- + return result; + } + ++ int getxattr (const char *pathname, const char *name, ++ const void *value, size_t size) ++ { ++ int result; ++ instw_t instw; ++ int status; ++ ++ REFCOUNT; ++ ++ if (!libc_handle) ++ initialize(); ++ ++ #if DEBUG ++ debug(2,"getxattr(%s,%s)\n",pathname,name); ++ #endif ++ ++ /* We were asked to work in "real" mode */ ++ if( !(__instw.gstatus & INSTW_INITIALIZED) || ++ !(__instw.gstatus & INSTW_OKWRAP) ) { ++ result=true_getxattr(pathname,name,value,size); ++ return result; ++ } ++ ++ instw_new(&instw); ++ instw_setpath(&instw,pathname); ++ instw_getstatus(&instw,&status); ++ ++ #if DEBUG ++ instw_print(&instw); ++ #endif ++ ++ if(status&INSTW_TRANSLATED) { ++ result=true_getxattr(instw.translpath,name,value,size); ++ } else { ++ result=true_getxattr(instw.path,name,value,size); ++ } ++ ++ instw_delete(&instw); ++ ++ return result; ++ } ++ ++ int lgetxattr (const char *pathname, const char *name, ++ const void *value, size_t size) ++ { ++ int result; ++ instw_t instw; ++ int status; ++ ++ REFCOUNT; ++ ++ if (!libc_handle) ++ initialize(); ++ ++ #if DEBUG ++ debug(2,"lgetxattr(%s,%s)\n",pathname,name); ++ #endif ++ ++ /* We were asked to work in "real" mode */ ++ if( !(__instw.gstatus & INSTW_INITIALIZED) || ++ !(__instw.gstatus & INSTW_OKWRAP) ) { ++ result=true_lgetxattr(pathname,name,value,size); ++ return result; ++ } ++ ++ instw_new(&instw); ++ instw_setpath(&instw,pathname); ++ instw_getstatus(&instw,&status); ++ ++ #if DEBUG ++ instw_print(&instw); ++ #endif ++ ++ if(status&INSTW_TRANSLATED) { ++ result=true_lgetxattr(instw.translpath,name,value,size); ++ } else { ++ result=true_lgetxattr(instw.path,name,value,size); ++ } ++ ++ instw_delete(&instw); ++ ++ return result; ++ } ++ + #if(GLIBC_MINOR >= 1) + + int creat64(const char *pathname, __mode_t mode) { +*************** +*** 3663,3668 **** +--- 3751,3791 ---- + return result; + } + ++ int __open_2(const char *pathname, int flags, ...) { ++ va_list ap; ++ mode_t mode; ++ ++ #if DEBUG ++ debug(2,"__open_2(%s,%d,mode)\n",pathname,flags); ++ #endif ++ ++ va_start(ap, flags); ++ mode = va_arg(ap, mode_t); ++ va_end(ap); ++ ++ /* The open() function in Glibc 2.9 is an always-inline ++ function that may call __open_2(), so it's important that ++ we handle it. I don't know what __open_2() is supposed to ++ do, but redirecting it to open() seems to work fine. */ ++ ++ return open(pathname,flags,mode); ++ } ++ ++ int __open64_2(const char *pathname, int flags, ...) { ++ va_list ap; ++ mode_t mode; ++ ++ #if DEBUG ++ debug(2,"__open64_2(%s,%d,mode)\n",pathname,flags); ++ #endif ++ ++ va_start(ap, flags); ++ mode = va_arg(ap, mode_t); ++ va_end(ap); ++ ++ return open64(pathname,flags,mode); ++ } ++ + struct dirent64 *readdir64(DIR *dir) { + struct dirent64 *result; + diff --git a/pkgs/tools/package-management/checkinstall/readlink.patch b/pkgs/tools/package-management/checkinstall/readlink.patch deleted file mode 100644 index f276c057d8f9..000000000000 --- a/pkgs/tools/package-management/checkinstall/readlink.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/installwatch-0.7.0beta5/installwatch.c 2007-04-07 14:27:23.000000000 -0400 -+++ b/installwatch-0.7.0beta5/installwatch.c 2007-04-07 14:25:06.000000000 -0400 -@@ -84,7 +84,7 @@ - static int (*true_open)(const char *, int, ...); - static DIR *(*true_opendir)(const char *); - static struct dirent *(*true_readdir)(DIR *dir); --static int (*true_readlink)(const char*,char *,size_t); -+static ssize_t (*true_readlink)(const char*,char *,size_t); - static char *(*true_realpath)(const char *,char *); - static int (*true_rename)(const char *, const char *); - static int (*true_rmdir)(const char *); -@@ -546,7 +546,7 @@ - struct utimbuf timbuf; - size_t truesz; - char linkpath[PATH_MAX+1]; -- size_t linksz; -+ ssize_t linksz; - - #if DEBUG - debug(2,"copy_path(%s,%s)\n",truepath,translroot); -@@ -1582,7 +1582,7 @@ - struct stat reslvinfo; - instw_t iw; - char wpath[PATH_MAX+1]; -- size_t wsz=0; -+ ssize_t wsz=0; - char linkpath[PATH_MAX+1]; - - -@@ -2698,8 +2698,8 @@ - return result; - } - --int readlink(const char *path,char *buf,size_t bufsiz) { -- int result; -+ssize_t readlink(const char *path,char *buf,size_t bufsiz) { -+ ssize_t result; - instw_t instw; - int status; - diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 3ce33f6f6be0..c0fda960b96b 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -5,11 +5,11 @@ }: stdenv.mkDerivation { - name = "nix-0.13pre14422"; + name = "nix-0.13pre14722"; src = fetchurl { - url = http://hydra.nixos.org/build/2775/download/1/nix-0.13pre14422.tar.bz2; - sha256 = "29362caa3fece6eae9d06a14930bf04fba41801b79a0f43eefb2ecc719fab934"; + url = http://hydra.nixos.org/build/6757/download/1/nix-0.13pre14722.tar.bz2; + sha256 = "1459dd526a7805dedee91033313da4da249bf2ef13eb89c8c2a64e326464f68b"; }; buildInputs = [perl curl openssl]; diff --git a/pkgs/tools/security/mktemp/default.nix b/pkgs/tools/security/mktemp/default.nix index 537337a79317..001fa4f09535 100644 --- a/pkgs/tools/security/mktemp/default.nix +++ b/pkgs/tools/security/mktemp/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "mktemp-1.5"; + name = "mktemp-1.6"; src = fetchurl { - url = ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.5.tar.gz; - md5 = "9a35c59502a228c6ce2be025fc6e3ff2"; + url = ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.6.tar.gz; + sha256 = "1nfj89b0dv1c2fyqi1pg54fyzs3462cbp7jv7lskqsxvqy4mh9x1"; }; } diff --git a/pkgs/tools/system/plan9port/builder.sh b/pkgs/tools/system/plan9port/builder.sh new file mode 100644 index 000000000000..f33dc7227fba --- /dev/null +++ b/pkgs/tools/system/plan9port/builder.sh @@ -0,0 +1,49 @@ +source $stdenv/setup + +tar xvfz $src + +cd plan9 + +export PLAN9=`pwd` +export X11=/tmp + +# Patch for the installation +sed -i -e 's@`which echo`@echo@' lib/moveplan9.sh + +OLDPATH=$PATH +PATH=`pwd`/bin:$PATH + +gcc lib/linux-isnptl.c -lpthread +set +e +if ./a.out > /dev/null +then + echo "SYSVERSION=2.6.x" >config +else + echo "SYSVERSION=2.4.x" >config +fi +rm -f ./a.out +set -e + +pushd src + +# Build mk +../dist/buildmk 2>&1 | sed 's/^[+] //' + +# Build everything + +mk clean +mk libs-nuke +mk all || exit 1 +mk install || exit 1 + +popd + +# Installation +export PLAN9=$out +ensureDir $PLAN9 +GLOBIGNORE='src:.*' +cp -R * $PLAN9 +GLOBIGNORE= + +cd $PLAN9 +sh lib/moveplan9.sh `pwd` diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix new file mode 100644 index 000000000000..3c31e4b53457 --- /dev/null +++ b/pkgs/tools/system/plan9port/default.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, libX11, xproto, libXt, xextproto}: + +stdenv.mkDerivation { + name = "plan9port-20090318"; + + builder = ./builder.sh; + + src = fetchurl { + url = http://swtch.com/plan9port/plan9port-20090318.tgz; + sha256 = "1idb2l1s5j34sa1dj1wwnvj97z5z7cy73qjafrxf2bbda26axzqj"; + }; + + buildInputs = [ libX11 xproto libXt xextproto ]; + + meta = { + homepage = "http://swtch.com/plan9port/"; + description = "Plan 9 from User Space"; + license="free"; + }; +} diff --git a/pkgs/tools/typesetting/halibut/default.nix b/pkgs/tools/typesetting/halibut/default.nix new file mode 100644 index 000000000000..68c09f86e118 --- /dev/null +++ b/pkgs/tools/typesetting/halibut/default.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl, perl}: + +stdenv.mkDerivation { + name = "halibut-1.0"; + + src = fetchurl { + url = http://www.chiark.greenend.org.uk/~sgtatham/halibut/halibut-1.0.tar.gz; + sha256 = "0d039adb88cb8de6f350563514d013209c2d321d1e5c49ea56462c6803f29adb"; + }; + + buildInputs = [ perl ]; + + patchPhase = '' + sed -i -e s@/usr/local@$out@ Makefile + sed -i -e 's@(prefix)/man@(prefix)/share/man@' doc/Makefile + ''; + + installPhase = '' + ensureDir $out/bin + ensureDir $out/share/man/man1 + pushd doc + make halibut.1 + popd + make install + ''; + + meta = { + description = "Documentation production system for software manuals"; + homepage = http://www.chiark.greenend.org.uk/~sgtatham/halibut/; + license = "free"; + }; +} diff --git a/pkgs/tools/typesetting/pdf2djvu/default.nix b/pkgs/tools/typesetting/pdf2djvu/default.nix new file mode 100644 index 000000000000..9a647e081064 --- /dev/null +++ b/pkgs/tools/typesetting/pdf2djvu/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl, pkgconfig, djvulibre, poppler, fontconfig, libjpeg }: + +stdenv.mkDerivation { + name = "pdf2djvu-0.5.3"; + + src = fetchurl { + url = http://pdf2djvu.googlecode.com/files/pdf2djvu_0.5.3.tar.gz; + sha256 = "b36b958fc395dc8976485bef09aac2b97435d0d9f21b4cf8dacaa5b55f3f2c1c"; + }; + + buildInputs = [ pkgconfig djvulibre poppler fontconfig libjpeg ]; + + meta = { + description = "Creates djvu files from PDF files"; + homepage = http://code.google.com/p/pdf2djvu/; + license = "GPLv2"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8337ab7b9792..9b1e63074b60 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -49,12 +49,19 @@ let homeDir = getEnv "HOME"; configFile2 = homeDir + "/.nixpkgs/config.nix"; - body = + configExpr = if configFile != "" && pathExists configFile then import (toPath configFile) else if homeDir != "" && pathExists configFile2 then import (toPath configFile2) else {}; + + # allow both: + # { /* the config */ } and + # { pkgsOrig, pkgs, ... } : { /* the config */ } + body = if builtins.isFunction configExpr + then configExpr { inherit pkgs pkgsOrig; } + else configExpr; }; # Return an attribute from the Nixpkgs configuration file, or @@ -106,8 +113,7 @@ let inherit lib config getConfig; - addAttrsToDerivation = extraAttrs: stdenv: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // extraAttrs); }; + inherit (lib) lowPrio appendToName; # Applying this to an attribute set will cause nix-env to look # inside the set for derivations. @@ -142,22 +148,6 @@ let version = getConfig [ "environment" "versions" name ]; }; - # Change the symbolic name of a package for presentation purposes - # (i.e., so that nix-env users can tell them apart). - setName = name: drv: drv // {inherit name;}; - - updateName = updater: drv: drv // {name = updater (drv.name);}; - - # !!! the suffix should really be appended *before* the version, at - # least most of the time. - appendToName = suffix: updateName (name: "${name}-${suffix}"); - - # Decrease the priority of the package, i.e., other - # versions/variants will be preferred. - lowPrio = drv: drv // { - meta = (if drv ? meta then drv.meta else {}) // {priority = "10";}; - }; - # Check absence of non-used options checker = x: flag: opts: config: (if flag then let result=( @@ -793,6 +783,10 @@ let inherit fetchurl stdenv; }); + halibut = import ../tools/typesetting/halibut { + inherit fetchurl stdenv perl; + }; + hddtemp = import ../tools/misc/hddtemp { inherit fetchurl stdenv; }; @@ -896,12 +890,16 @@ let inherit fetchurl stdenv zlib lzo bzip2 nasm; }; + lsh = import ../tools/networking/lsh { + inherit stdenv fetchurl gperf guile gmp zlib liboop gnum4 pam; + }; + lzma = import ../tools/compression/lzma { inherit fetchurl stdenv; }; - lsh = import ../tools/networking/lsh { - inherit stdenv fetchurl gperf guile gmp zlib liboop gnum4 pam; + lzop = import ../tools/compression/lzop { + inherit fetchurl stdenv lzo; }; man = import ../tools/misc/man { @@ -1061,6 +1059,10 @@ let inherit fetchurl stdenv zlib; }; + pdf2djvu = import ../tools/typesetting/pdf2djvu { + inherit fetchurl stdenv pkgconfig djvulibre poppler fontconfig libjpeg; + }; + pdfjam = import ../tools/typesetting/pdfjam { inherit fetchurl stdenv; }; @@ -1068,6 +1070,7 @@ let pdsh = import ../tools/networking/pdsh { inherit fetchurl stdenv perl; readline = if getPkgConfig "pdsh" "readline" true then readline else null; + rsh = getPkgConfig "pdsh" "rsh" true; ssh = if getPkgConfig "pdsh" "ssh" true then openssh else null; pam = if getPkgConfig "pdsh" "pam" true then pam else null; }; @@ -1077,6 +1080,11 @@ let inherit (gnome) glib gtk; }; + plan9port = import ../tools/system/plan9port { + inherit fetchurl stdenv; + inherit (xlibs) libX11 xproto libXt xextproto; + }; + ploticus = import ../tools/graphics/ploticus { inherit fetchurl stdenv zlib libpng; inherit (xlibs) libX11; @@ -1098,6 +1106,10 @@ let inherit stdenv fetchurl ncurses; }; + pv = import ../tools/misc/pv { + inherit fetchurl stdenv; + }; + pwgen = import ../tools/security/pwgen { inherit stdenv fetchurl; }; @@ -1152,6 +1164,11 @@ let inherit fetchurl stdenv cpio zlib bzip2 file sqlite beecrypt neon elfutils; }; + rrdtool = import ../tools/misc/rrdtool { + inherit stdenv fetchurl gettext perl pkgconfig libxml2 cairo; + inherit (gtkLibs) pango; + }; + rtorrent = import ../tools/networking/p2p/rtorrent { inherit fetchurl stdenv libtorrent ncurses pkgconfig libsigcxx curl zlib openssl; }; @@ -1264,6 +1281,14 @@ let inherit fetchurl stdenv ncurses; }; + ucl = import ../development/libraries/ucl { + inherit fetchurl stdenv; + }; + + upx = import ../tools/compression/upx { + inherit fetchurl stdenv ucl zlib; + }; + vpnc = import ../tools/networking/vpnc { inherit fetchurl stdenv libgcrypt perl gawk nettools makeWrapper; @@ -1858,7 +1883,9 @@ let }; monotone = import ../applications/version-management/monotone { - inherit stdenv fetchurl boost zlib; + inherit stdenv fetchurl boost zlib botan libidn pcre + sqlite; + lua = lua5; }; monotoneViz = builderDefsPackage (selectVersion ../applications/version-management/monotone-viz "1.0.1") { @@ -2510,8 +2537,9 @@ let }; # couldn't find the source yet - selenium_rc_binary = import ../development/tools/selenium/remote-control { + seleniumRCBin = import ../development/tools/selenium/remote-control { inherit fetchurl stdenv unzip; + jre = jdk; }; scons = import ../development/tools/build-managers/scons { @@ -2682,6 +2710,10 @@ let }; boost = boostVersionChoice "1.38.0"; + botan = builderDefsPackage (import ../development/libraries/botan) { + inherit perl; + }; + buddy = import ../development/libraries/buddy { inherit fetchurl stdenv; }; @@ -3877,6 +3909,10 @@ let wxGTK28 = wxGTK28deps null; + wtk = import ../development/libraries/wtk { + inherit fetchurl stdenv unzip xlibs; + }; + x264 = import ../development/libraries/x264 { inherit fetchurl stdenv; }; @@ -6588,6 +6624,8 @@ let inherit fetchurl stdenv; }; + libuuid = e2fsprogs; + e3cfsprogs = import ../os-specific/linux/e3cfsprogs { inherit stdenv fetchurl gettext; }; @@ -6974,7 +7012,7 @@ let inherit fetchurl stdenv builderDefs kernel lib; }; - nvidiaDrivers = import ../os-specific/linux/nvidia { + nvidia_x11 = import ../os-specific/linux/nvidia-x11 { inherit stdenv fetchurl kernel xlibs gtkLibs zlib; }; @@ -7166,7 +7204,7 @@ let inherit fetchurl stdenv; }; - gw6c = builderDefsPackage (selectVersion ../os-specific/linux/gw6c "5.1") { + gw6c = builderDefsPackage (import ../os-specific/linux/gw6c) { inherit fetchurl stdenv nettools openssl procps iproute; }; @@ -7328,25 +7366,16 @@ let inherit fetchurl stdenv libusb; }; - utillinux = composedArgsAndFun (import ../os-specific/linux/util-linux) { - inherit fetchurl stdenv; - }; + utillinux = utillinuxng; - utillinuxCurses = import ../os-specific/linux/util-linux { - inherit fetchurl stdenv ncurses; - }; + utillinuxCurses = utillinuxngCurses; - utillinuxStatic = lowPrio (appendToName "static" (import ../os-specific/linux/util-linux { - inherit fetchurl; - stdenv = makeStaticBinaries stdenv; - })); - - utillinuxng = composedArgsAndFun (import ../os-specific/linux/util-linux-ng) { + utillinuxng = makeOverridable (import ../os-specific/linux/util-linux-ng) { inherit fetchurl stdenv e2fsprogs; }; - utillinuxngCurses = composedArgsAndFun (import ../os-specific/linux/util-linux-ng) { - inherit fetchurl stdenv e2fsprogs ncurses; + utillinuxngCurses = utillinuxng.override { + inherit ncurses; }; wesnoth = import ../games/wesnoth { @@ -7473,6 +7502,10 @@ let inherit (gtkLibs) glib; }; + stdmanpages = import ../data/documentation/std-man-pages { + inherit fetchurl stdenv; + }; + iana_etc = import ../data/misc/iana-etc { inherit fetchurl stdenv; }; @@ -7542,6 +7575,11 @@ let inherit (xlibs) libX11 libXext libSM; }; + aangifte2008 = import ../applications/taxes/aangifte-2008 { + inherit stdenv fetchurl; + inherit (xlibs) libX11 libXext libSM; + }; + abcde = import ../applications/audio/abcde { inherit fetchurl stdenv libcdio cddiscid wget bash vorbisTools makeWrapper; @@ -7580,11 +7618,9 @@ let }; audacity = import ../applications/audio/audacity { - inherit fetchurl stdenv libogg libvorbis libsndfile libmad - pkgconfig gettext; + inherit fetchurl stdenv gettext pkgconfig zlib; inherit (gtkLibs) gtk glib; - wxGTK = wxGTK28deps; - inherit builderDefs stringsWithDeps; + wxGTK = wxGTK28; }; aumix = import ../applications/audio/aumix { @@ -7852,7 +7888,7 @@ let }; dmtx = builderDefsPackage (import ../tools/graphics/dmtx) { - inherit libpng libtiff libjpeg imagemagick librsvg + inherit libpng libtiff libjpeg imagemagick librsvg pkgconfig bzip2 zlib; inherit (xlibs) libX11; }; @@ -7884,7 +7920,7 @@ let eclipse = plugins: import ../applications/editors/eclipse { - inherit fetchurl stdenv makeWrapper jdk; + inherit fetchurl stdenv jdk; inherit (gtkLibs) gtk glib; inherit (xlibs) libXtst; inherit plugins; @@ -7961,6 +7997,12 @@ let inherit stdenv fetchurl openssl; }; + gwenview = import ../applications/graphics/gwenview { + inherit stdenv fetchurl exiv2 zlib libjpeg perl libpng expat qt3; + inherit (kde3) kdelibs; + inherit (xlibs) libXt libXext; + }; + wavesurfer = import ../applications/misc/audio/wavesurfer { inherit fetchurl stdenv tcl tk snack makeWrapper; }; @@ -8084,6 +8126,11 @@ let }); git = gitAndTools.git; + qcad = import ../applications/misc/qcad { + inherit fetchurl stdenv qt3 libpng; + inherit (xlibs) libXext libX11; + }; + qjackctl = import ../applications/audio/qjackctl { inherit fetchurl stdenv alsaLib jackaudio; qt4 = qt4; @@ -8427,9 +8474,9 @@ let inherit fetchurl zlib glibc stdenv; # stdenv = overrideGCC stdenv gcc40; inherit (xlibs) libX11 libSM libICE libXt libXext; - qt = qt3gcc33; #33motif = lesstif; - libstdcpp5 = gcc33.gcc; + qt = if (stdenv.system == "i686-linux") then qt3gcc33 else qt3; + libstdcpp5 = (if (stdenv.system == "i686-linux") then gcc33 /* stdc++ 3.8 is used */ else gcc42).gcc; }; pan = import ../applications/networking/newsreaders/pan { @@ -8438,6 +8485,10 @@ let spellChecking = false; }; + paraview = import ../applications/graphics/paraview { + inherit fetchurl stdenv cmake qt4; + }; + pidgin = import ../applications/networking/instant-messengers/pidgin { inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 nss gtkspell aspell gettext ncurses avahi dbus dbus_glib lib intltool; @@ -8597,20 +8648,7 @@ let subversion = subversion15; - subversion14 = makeOverridable (import ../applications/version-management/subversion-1.4.x) { - inherit fetchurl stdenv apr aprutil expat swig zlib jdk; - neon = neon026; - bdbSupport = getConfig ["subversion" "bdbSupport"] true; - httpServer = getConfig ["subversion" "httpServer"] false; - sslSupport = getConfig ["subversion" "sslSupport"] true; - pythonBindings = getConfig ["subversion" "pythonBindings"] false; - perlBindings = getConfig ["subversion" "perlBindings"] false; - javahlBindings = getConfig ["subversion" "javahlBindings"] false; - compressionSupport = getConfig ["subversion" "compressionSupport"] true; - httpd = apacheHttpd; - }; - - subversion15 = makeOverridable (import ../applications/version-management/subversion-1.5.x) { + subversion15 = makeOverridable (import ../applications/version-management/subversion/1.5.nix) { inherit fetchurl stdenv apr aprutil expat swig zlib jdk; neon = neon028; bdbSupport = getConfig ["subversion" "bdbSupport"] true; @@ -8624,7 +8662,21 @@ let httpd = apacheHttpd; }; - subversionStatic = lowPrio (appendToName "static" (import ../applications/version-management/subversion-1.5.x { + subversion16 = makeOverridable (import ../applications/version-management/subversion/1.6.nix) { + inherit fetchurl stdenv apr aprutil expat swig zlib jdk sqlite; + neon = neon028; + bdbSupport = getConfig ["subversion" "bdbSupport"] true; + httpServer = getConfig ["subversion" "httpServer"] false; + httpSupport = getConfig ["subversion" "httpSupport"] true; + sslSupport = getConfig ["subversion" "sslSupport"] true; + pythonBindings = getConfig ["subversion" "pythonBindings"] false; + perlBindings = getConfig ["subversion" "perlBindings"] false; + javahlBindings = getConfig ["subversion" "javahlBindings"] false; + compressionSupport = getConfig ["subversion" "compressionSupport"] true; + httpd = apacheHttpd; + }; + + subversionStatic = lowPrio (appendToName "static" (import ../applications/version-management/subversion/1.6.nix { inherit fetchurl stdenv apr aprutil expat swig jdk; neon = import ../development/libraries/neon/0.28.nix { inherit fetchurl stdenv libxml2 zlib openssl; @@ -8636,6 +8688,10 @@ let zlib = import ../development/libraries/zlib { inherit fetchurl stdenv; static = true; + }; + sqlite = import ../development/libraries/sqlite { + inherit fetchurl stdenv readline; + static = true; }; bdbSupport = true; httpServer = false; @@ -9242,6 +9298,7 @@ let inherit libxml2 guile perl intltool libtool pkgconfig; }; + ### SCIENCE/BIOLOGY alliance = import ../applications/science/electronics/alliance { @@ -9286,6 +9343,7 @@ let inherit fetchurl stdenv perl paml; }; + ### SCIENCE/MATH atlas = import ../development/libraries/science/math/atlas { @@ -9296,18 +9354,21 @@ let inherit fetchurl stdenv gfortran; }; */ + ### SCIENCE/LOGIC coq = import ../applications/science/logic/coq { inherit fetchurl stdenv ocaml ncurses; }; + ### SCIENCE / ELECTRONICS ngspice = import ../applications/science/electronics/ngspice { inherit fetchurl stdenv readline; }; + ### SCIENCE / MATH maxima = import ../applications/science/math/maxima { @@ -9326,6 +9387,7 @@ let withX = true; }; + ### MISC atari800 = import ../misc/emulators/atari800 { @@ -9421,7 +9483,7 @@ let # don't have time for the source build right now # maven2 mvn_bin = import ../misc/maven/maven-2.nix { - inherit fetchurl stdenv; + inherit fetchurl stdenv unzip; }; nix = import ../tools/package-management/nix { @@ -9463,7 +9525,7 @@ let }; ntfsprogs = import ../misc/ntfsprogs { - inherit fetchurl stdenv; + inherit fetchurl stdenv libuuid; }; pgadmin = import ../applications/misc/pgadmin { @@ -9639,5 +9701,5 @@ let inherit (stdenv) mkDerivation; }; - libTests = import ../lib/tests.nix; + }; in pkgs diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix index b35c55630785..1166964f1f63 100644 --- a/pkgs/top-level/build-for-release.nix +++ b/pkgs/top-level/build-for-release.nix @@ -171,8 +171,8 @@ let ssmtp strace su - subversion14 subversion15 + subversion16 sudo superTuxKart swig diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 2012278ffd7b..8556c9529a48 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -17,7 +17,8 @@ args: with args; with stringsWithDeps; with lib; archiveType = s: (if hasSuffixHack ".tar" s then "tar" else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" - else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) then "tbz2" + else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) || + (hasSuffixHack ".tbz" s) then "tbz2" else if (hasSuffixHack ".tar.lzma" s) then "tar.lzma" else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip" else if (hasSuffixHack "-cvs-export" s) then "cvs-dir" diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index d6e3a118d44a..11c12378ba8d 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -39,6 +39,12 @@ releaseTools.makeSourceTarball { doCheck = true; checkPhase = '' + # Run the regression tests in `lib'. + if test "$(nix-instantiate --eval-only --strict tests.nix)" != "List([])"; then + echo "regression tests for `lib' failed" + exit 1 + fi + # Check that we can fully evaluate build-for-release.nix. header "checking pkgs/top-level/build-for-release.nix" nix-env --readonly-mode -f pkgs/top-level/build-for-release.nix \ diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index d4ec8aa190d6..73ecb5660a7f 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -4,6 +4,16 @@ let pkgs = allPackages {}; + /* Set the Hydra scheduling priority for a job. The default + priority (100) should be used for most jobs. A different + priority should only be used for a few particularly interesting + jobs (in terms of giving feedback to developers), such as stdenv. + */ + prio = level: job: toJob job // { schedulingPriority = level; }; + + toJob = x: if builtins.isAttrs x then x else + { type = "job"; systems = x; schedulingPriority = 100; }; + /* Perform a job on the given set of platforms. The function `f' is called by Hydra for each platform, and should return some job to build on that platform. `f' is passed the Nixpkgs collection @@ -13,13 +23,27 @@ let /* Map an attribute of the form `foo = [platforms...]' to `testOn [platforms...] (pkgs: pkgs.foo)'. */ - mapTestOn = pkgs.lib.mapAttrsRecursive - (path: value: testOn value (pkgs: pkgs.lib.getAttrFromPath path pkgs)); + mapTestOn = pkgs.lib.mapAttrsRecursiveCond + (as: !(as ? type && as.type == "job")) + (path: value: + let + job = toJob value; + getPkg = pkgs: + pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; } + (pkgs.lib.getAttrFromPath path pkgs); + in testOn job.systems getPkg); /* Common platform groups on which to test packages. */ - all = ["i686-linux" "x86_64-linux" "i686-darwin" "i686-cygwin"]; linux = ["i686-linux" "x86_64-linux"]; - allBut = (platform: pkgs.lib.filter (x: platform != x) all); + darwin = ["i686-darwin"]; + cygwin = ["i686-cygwin"]; + all = linux ++ darwin ++ cygwin; + allBut = platform: pkgs.lib.filter (x: platform != x) all; + + /* Platform groups for specific kinds of applications. */ + x11Supported = linux; + gtkSupported = linux; + ghcSupported = linux ++ darwin; in { @@ -27,118 +51,282 @@ in { } // mapTestOn { - glibc = linux; - hello = all; - pan = linux; - stdenv = all; - -/* MPlayer = linux; + abcde = linux; + alsaUtils = linux; apacheHttpd = linux; - */ + aspell = all; at = linux; + aterm25 = all; + aterm28 = all; + audacious = linux; + audacious_plugins = linux; autoconf = all; -/* + automake110x = all; + automake19x = all; avahi = allBut "i686-cygwin"; # Cygwin builds fail - */ bash = all; -/* - bazaar = all; - bitlbee = linux; + bashInteractive = all; + bazaar = linux; # first let sqlite3 work on darwin + binutils = linux; + bison23 = all; + bison24 = all; + bitlbee = linux; + bittorrent = linux; boost = all; + bsdiff = all; + bzip2 = all; + cabextract = all; + castleCombat = linux; cdrkit = linux; - cedet = all; - */ + cedet = linux; + chatzilla = linux; + cksfv = all; + compiz = linux; + coreutils = all; + cpio = all; + cron = linux; + cups = linux; + db4 = all; + dhcp = linux; + dietlibc = linux; + diffutils = all; + docbook5 = all; + docbook5_xsl = all; + docbook_xml_dtd_42 = all; + docbook_xml_dtd_43 = all; + docbook_xsl = all; + doxygen = linux; + e2fsprogs = linux; emacs22 = all; emacsUnicode = all; - emms = all; + emms = linux; + enscript = all; eprover = linux; - evince = all; -/* - firefox3 = linux; + evince = linux; + expect = linux; + exult = linux; + feh = linux; + file = all; + findutils = all; + firefox2 = linux; + firefox3 = prio 150 linux; + flex = all; + flex2535 = all; + gawk = all; gcc = all; + gcc33 = linux; + gcc34 = linux; + gcc43multi = ["x86_64-linux"]; gdb = all; + ghc = ghcSupported; ghostscript = linux; ghostscriptX = linux; - */ - git = all; - gnuplot = all; + gimp = linux; + git = linux; + gnash = linux; + gnugrep = all; + gnum4 = all; + gnumake = all; + gnupatch = all; + gnupg2 = linux; + gnuplot = allBut "i686-cygwin"; gnuplotX = linux; - gnutls = all; + gnused = all; + gnutar = all; + gnutls = linux; + gphoto2 = linux; + gprolog = linux; + gqview = gtkSupported; graphviz = all; - /* + grub = linux; + gsl = linux; guile = linux; # tests fail on Cygwin guileLib = linux; + gv = linux; + gzip = all; + hal = linux; hello = all; + host = linux; + iana_etc = linux; icecat3Xul = [ "i686-linux" ]; idutils = all; - */ - imagemagick = linux; - /* + imagemagick = allBut "i686-cygwin"; + impressive = linux; inetutils = linux; inkscape = linux; + iputils = linux; + irssi = linux; jnettop = linux; - */ - kernel_2_6_28 = linux; + jwhois = linux; + kbd = linux; + kcachegrind = linux; + keen4 = ["i686-linux"]; + klibc = linux; + ktorrent = linux; + kvm = linux; + less = all; + lftp = all; + lhs2tex = ghcSupported; libsmbios = linux; libtool = all; + libtool2 = all; + libxml2 = all; + libxslt = all; lout = linux; lsh = linux; - manpages = all; -/* - maxima = all; - mercurial = all; + lvm2 = linux; + man = linux; + manpages = linux; + maxima = linux; + mc = all; + mdadm = linux; + mercurial = allBut "i686-cygwin"; mesa = linux; - monotone = all; - mysql = all; - nano = all; + mingetty = linux; + mk = linux; + mktemp = all; + mod_python = linux; + module_init_tools = linux; + mono = linux; + monotone = linux; + mpg321 = linux; + mysql = linux; + nano = allBut "i686-cygwin"; + netcat = all; + nfsUtils = linux; + nix = all; + nixUnstable = all; + nss_ldap = linux; nssmdns = linux; ntfs3g = linux; - octave = all; - */ + ntp = linux; + nxml = all; + octave = linux; openoffice = linux; openssh = linux; - /* - pan = linux; + openssl = all; + pam_console = linux; + pam_ldap = linux; + pam_login = linux; + pam_unix2 = linux; + pan = gtkSupported; + par2cmdline = all; + pciutils = linux; perl = all; - pidgin = all; + perlTaskCatalystTutorial = linux; + php = linux; + pidgin = linux; + pinentry = linux; + pkgconfig = all; pltScheme = linux; - pmccabe = all; + pmccabe = linux; portmap = linux; postgresql = all; - python = all; + procps = linux; + python = allBut "i686-cygwin"; pythonFull = linux; - rubber = all; - ruby = all; - */ - qt3 = linux; + qt3 = allBut "i686-cygwin"; qt4 = linux; - /* - rsync = all; - sloccount = all; + quake3demo = linux; + readline = all; + reiserfsprogs = linux; + rogue = all; + rpm = linux; + rsync = linux; + rubber = allBut "i686-cygwin"; + ruby = all; + screen = linux ++ darwin; + seccure = linux; + slim = linux; + sloccount = allBut "i686-cygwin"; + spidermonkey = linux; + splashutils_13 = linux; + splashutils_15 = linux; + sqlite = allBut "i686-cygwin"; + ssmtp = linux; + stdenv = prio 175 all; strace = linux; - subversion = linux; + su = linux; + subversion = all; + subversion16 = all; + sudo = linux; + superTuxKart = linux; + swig = linux; + sylpheed = linux; + sysklogd = linux; + syslinux = ["i686-linux"]; + sysvinit = linux; + sysvtools = linux; tcpdump = linux; - texinfo = all; - */ + teeworlds = linux; + tetex = linux; texLive = linux; + texLiveBeamer = linux; + texLiveExtra = linux; + texinfo = all; thunderbird = linux; - vimHugeX = all; - /* + tightvnc = linux; + time = linux; + tinycc = ["i686-linux"]; + udev = linux; + uml = ["i686-linux"]; + unzip = all; + upstart = linux; + utillinux = linux; + valgrind = linux; + vim = linux; + vimHugeX = linux; vlc = linux; - */ - webkit = all; + vorbisTools = linux; + vpnc = linux; + w3m = all; + webkit = linux; + wget = all; wine = ["i686-linux"]; - /* wirelesstools = linux; + wxHaskell = linux; + x11_ssh_askpass = linux; + xchm = linux; + xfig = x11Supported; + xineUI = linux; + xkeyboard_config = linux; xlockmore = linux; + xmltv = linux; xpdf = linux; + xscreensaver = linux; + xsel = linux; + xterm = linux; + zdelta = linux; zile = linux; + zip = all; + + aspellDicts = { + de = all; + en = all; + es = all; + fr = all; + nl = all; + ru = all; + }; + + gnome = { + gconfeditor = linux; + gnomepanel = linux; + gnometerminal = linux; + gnomeutils = linux; + metacity = linux; + }; gtkLibs = { gtk = linux; }; + kde3 = { + kdebase = linux; + kdelibs = linux; + }; + kde42 = { kdeadmin = linux; kdeartwork = linux; @@ -159,8 +347,12 @@ in { kdewebdev = linux; }; + kernelPackages_2_6_26 = { + kernel = linux; + }; + kernelPackages_2_6_27 = { - aufs = linux; + # aufs = linux; # kernel seems to be too old for that package kernel = linux; }; @@ -169,10 +361,28 @@ in { kernel = linux; }; -*/ xorg = { + fontadobe100dpi = linux; + fontadobe75dpi = linux; + fontbh100dpi = linux; + fontbhlucidatypewriter100dpi = linux; + fontbhlucidatypewriter75dpi = linux; + fontbhttf = linux; + fontcursormisc = linux; + fontmiscmisc = linux; + iceauth = linux; libX11 = linux; + setxkbmap = linux; + xauth = linux; + xf86inputkeyboard = linux; + xf86inputmouse = linux; + xf86videoi810 = linux; + xf86videovesa = linux; + xkbcomp = linux; xorgserver = linux; + xrandr = linux; + xrdb = linux; + xset = linux; }; }