diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 6839f337b6a..2f1677622a9 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -55,6 +55,8 @@ args.stdenv.mkDerivation { preBuild="touch src/auto/link.sed"; configureFlags = args.lib.condConcat "" configFlags check; + NIX_LDFLAGS = "-lpthread -lutil"; + meta = { description = "The most popular clone of the VI editor"; homepage = http://www.vim.org; diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/6.3.8-5.nix similarity index 58% rename from pkgs/applications/graphics/ImageMagick/default.nix rename to pkgs/applications/graphics/ImageMagick/6.3.8-5.nix index 56c91bb247a..83c7075f8e5 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/6.3.8-5.nix @@ -1,10 +1,10 @@ args: with args; -(stdenv.mkDerivation (rec { - name = "ImageMagick-6.3.7-10"; +stdenv.mkDerivation (rec { + name = "ImageMagick-6.3.8-5"; src = fetchurl { - url = "mirror://imagemagick/" + name + ".tar.bz2"; - sha256 = "c00fb0d21baa292a55bb0e30ca30ffe2571e0d3df9e692da441aa81ff1cdde10"; + url = "ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2"; + sha256 = "0lsvi2z5b5zam6yvjzsyjpa36rg1c0kczifz73k9b4v8zz9a9vfl"; }; configureFlags = " --with-dots --with-gs-font-dir="+ ghostscript + @@ -17,13 +17,10 @@ args: with args; ++ (if args ? librsvg then [args.librsvg] else []); meta = { - description = ''ImageMagick(R) is a software suite to create, edit, and compose bitmap - images. It can read, convert and write images in a variety of - formats (over 100).''; homepage = http://www.imagemagick.org; }; } // (if args ? tetex then { preConfigure = " export DVIDecodeDelegate=${args.tetex}/bin/dvips "; -} else {}))) +} else {})) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index dfed92f691e..b8ff2486330 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -1,37 +1,16 @@ -{ stdenv, fetchurl, pkgconfig, - perl, perlXMLParser, - gtk, libXft, fontconfig, - libpng, lcms, - zlib, popt, - boehmgc, - libxml2, libxslt, - glib, - gtkmm, glibmm, libsigcxx, - boost, - gettext -}: +args: with args; -stdenv.mkDerivation { - name = "inkscape-0.45"; +stdenv.mkDerivation rec { + name = "inkscape-0.45.1"; src = fetchurl { - url = mirror://sourceforge/inkscape/inkscape-0.45.1.tar.gz; + url = "mirror://sf/inkscape/${name}.tar.gz"; sha256 = "1y0b9bm8chn6a2ip99dj4dhg0188yn67v571ha0x38wrlmvn4k0d"; }; buildInputs = [ - pkgconfig - perl perlXMLParser - gtk libXft fontconfig - libpng - zlib popt - boehmgc - libxml2 libxslt - glib - gtkmm glibmm libsigcxx - lcms - boost - gettext + pkgconfig perl perlXMLParser gtk libXft fontconfig libpng zlib popt boehmgc + libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext ]; meta = { diff --git a/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix index 717d66e2c29..f02857cf80a 100644 --- a/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix +++ b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix @@ -4,6 +4,6 @@ build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamag args: with args; [ libpng - GConf mesa metacity librsvg dbus dbus_glib gnomedesktop git autoconf automake + GConf mesa metacity librsvg dbus.libs dbus_glib gnomedesktop git autoconf automake libtool libxslt libwnck intltool perl perlXMLParser compiz ] diff --git a/pkgs/applications/window-managers/compiz/0.6.2.nix b/pkgs/applications/window-managers/compiz/0.6.2.nix index 78369081bc9..8827b3cb7a0 100644 --- a/pkgs/applications/window-managers/compiz/0.6.2.nix +++ b/pkgs/applications/window-managers/compiz/0.6.2.nix @@ -14,7 +14,7 @@ args : with args; propagatedBuildInputs = [ libpng libXcomposite libXfixes libXdamage libXrandr libXinerama libICE libSM startupnotification mesa GConf perl perlXMLParser libxslt - dbus dbus_glib compositeproto fixesproto damageproto randrproto + dbus.libs dbus_glib compositeproto fixesproto damageproto randrproto xineramaproto renderproto kbproto xextproto libXrender ]; configureFlags = ["--enable-gtk" "--enable-fuse" diff --git a/pkgs/applications/window-managers/compiz/extra.nix b/pkgs/applications/window-managers/compiz/extra.nix index 501518d3f67..70f4e5dd8c3 100644 --- a/pkgs/applications/window-managers/compiz/extra.nix +++ b/pkgs/applications/window-managers/compiz/extra.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "7fc7faafccfdf22dea7ac1de6629dcb55ec63d84fcb57a14559309cf284fa94f"; }; buildInputs = [ - pkgconfig compiz perl perlXMLParser GConf dbus gtk + pkgconfig compiz perl perlXMLParser GConf dbus.libs gtk ]; preBuild = " makeFlagsArray=(moduledir=$out/lib/compiz) diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index f9dbc0e784f..7a2f9c20f27 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -50,14 +50,17 @@ fi doSubstitute() { local src=$1 local dst=$2 - substitute "$src" "$dst" \ - --subst-var "out" \ - --subst-var "shell" \ - --subst-var "gcc" \ - --subst-var "gccProg" \ - --subst-var "binutils" \ - --subst-var "libc" \ - --subst-var-by "ld" "$ldPath/ld" + # Can't use substitute() here, because replace may not have been + # built yet (in the bootstrap). + sed \ + -e "s^@out@^$out^g" \ + -e "s^@shell@^$shell^g" \ + -e "s^@gcc@^$gcc^g" \ + -e "s^@gccProg@^$gccProg^g" \ + -e "s^@binutils@^$binutils^g" \ + -e "s^@libc@^$libc^g" \ + -e "s^@ld@^$ldPath/ld^g" \ + < "$src" > "$dst" } @@ -108,3 +111,11 @@ doSubstitute "$addFlags" "$out/nix-support/add-flags.sh" doSubstitute "$setupHook" "$out/nix-support/setup-hook" cp -p $utils $out/nix-support/utils.sh + + +# Propagate the wrapped gcc so that if you install the wrapper, you get +# tools like gcov, the manpages, etc. as well (including for binutils +# and Glibc). +if test -z "$nativeTools"; then + echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages +fi diff --git a/pkgs/data/fonts/freefont-ttf/default.nix b/pkgs/data/fonts/freefont-ttf/default.nix index 19e1a21450d..e1f8c74ae62 100644 --- a/pkgs/data/fonts/freefont-ttf/default.nix +++ b/pkgs/data/fonts/freefont-ttf/default.nix @@ -6,6 +6,8 @@ stdenv.mkDerivation { url = http://download.savannah.gnu.org/releases/freefont/freefont-ttf-20060126.tar.gz; md5 = "822aba4e2ed065d9d3ded6e26e495854"; }; - buildPhase = "true"; - installPhase = "ensureDir $out/share/fonts/truetype; cp *.ttf $out/share/fonts/truetype"; -} \ No newline at end of file + installPhase = '' + ensureDir $out/share/fonts/truetype + cp *.ttf $out/share/fonts/truetype + ''; +} diff --git a/pkgs/data/misc/shared-mime-info/0.22.nix b/pkgs/data/misc/shared-mime-info/0.22.nix new file mode 100644 index 00000000000..399b3296d38 --- /dev/null +++ b/pkgs/data/misc/shared-mime-info/0.22.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "1chz63v9jr009z9jhs07klybmhyf58i8vxipigf5gkdabjiclcyr" args diff --git a/pkgs/data/misc/shared-mime-info/0.23.nix b/pkgs/data/misc/shared-mime-info/0.23.nix new file mode 100644 index 00000000000..38617dfe8e3 --- /dev/null +++ b/pkgs/data/misc/shared-mime-info/0.23.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "080ny2vy00202hxcm7xm72j1zmyfs15dbsnqipwni6b2dg2am3q3" args diff --git a/pkgs/data/misc/shared-mime-info/common.nix b/pkgs/data/misc/shared-mime-info/common.nix new file mode 100644 index 00000000000..8c2ff363c6a --- /dev/null +++ b/pkgs/data/misc/shared-mime-info/common.nix @@ -0,0 +1,16 @@ +hash: args: with args; + +stdenv.mkDerivation rec { + name = "shared-mime-info-" + version; + + src = fetchurl { + url = "http://freedesktop.org/~hadess/${name}.tar.bz2"; + sha256 = hash; + }; + + buildInputs = [perl perlXMLParser pkgconfig gettext libxml2 glib]; + + meta = { + homepage = http://freedesktop.org/wiki/Software/shared-mime-info; + }; +} diff --git a/pkgs/data/misc/shared-mime-info/default.nix b/pkgs/data/misc/shared-mime-info/default.nix deleted file mode 100644 index 0b82782d31d..00000000000 --- a/pkgs/data/misc/shared-mime-info/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{stdenv, fetchurl, perl, perlXMLParser, pkgconfig, gettext, libxml2, glib}: - -stdenv.mkDerivation { - name = "shared-mime-info-0.22"; - - src = fetchurl { - url = http://freedesktop.org/~hadess/shared-mime-info-0.22.tar.bz2; - sha256 = "1chz63v9jr009z9jhs07klybmhyf58i8vxipigf5gkdabjiclcyr"; - }; - - buildInputs = [perl perlXMLParser pkgconfig gettext libxml2 glib]; -} diff --git a/pkgs/desktops/gnome/default.nix b/pkgs/desktops/gnome/default.nix index a3f8d4a9c05..014a99b674a 100644 --- a/pkgs/desktops/gnome/default.nix +++ b/pkgs/desktops/gnome/default.nix @@ -1,12 +1,6 @@ # todo audiofile is also part of the gnome platform. Move it to this collection? -{ stdenv, fetchurl, pkgconfig, audiofile -, flex, bison, popt, perl, zlib, libxml2, libxslt -, perlXMLParser, docbook_xml_dtd_42, docbook_xml_dtd_412 -, gettext, x11, libtiff, libjpeg -, libpng, gtkLibs, xlibs, bzip2, libcm, python, dbus_glib, ncurses -, which, libxml2Python, iconnamingutils -}: +args: with args; assert dbus_glib.glib == gtkLibs.glib; @@ -57,7 +51,7 @@ rec { gnomevfs = import ./gnome-vfs.nix { inherit fetchurl stdenv gnome pkgconfig perl libxml2 popt - perlXMLParser gettext bzip2 dbus_glib; + perlXMLParser gettext bzip2 dbus_glib openssl hal samba fam; input = platform.gnomevfs; }; diff --git a/pkgs/desktops/gnome/gnome-vfs.nix b/pkgs/desktops/gnome/gnome-vfs.nix index b374ad4d94d..24b99fb3b83 100644 --- a/pkgs/desktops/gnome/gnome-vfs.nix +++ b/pkgs/desktops/gnome/gnome-vfs.nix @@ -1,14 +1,11 @@ -{ input, stdenv, fetchurl, gnome, pkgconfig, perl, libxml2 -, popt, perlXMLParser, gettext, bzip2, dbus_glib -}: +args: with args; stdenv.mkDerivation { inherit (input) name src; buildInputs = [ pkgconfig perl gnome.glib libxml2 gnome.GConf gnome.libbonobo gnome.gnomemimedata popt perlXMLParser gettext bzip2 - dbus_glib + dbus_glib hal openssl samba fam ]; patches = [./no-kerberos.patch]; - configureFlags = "--disable-hal"; } diff --git a/pkgs/desktops/kde-4/support/akode.nix b/pkgs/desktops/kde-4/support/akode.nix index 1385def6b55..8fdf6736572 100644 --- a/pkgs/desktops/kde-4/support/akode.nix +++ b/pkgs/desktops/kde-4/support/akode.nix @@ -2,12 +2,6 @@ args: with args; stdenv.mkDerivation { name = "akode-2.0.0dev"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/akode; - rev = 732646; - md5 = "6629ffedc42c020d2e8645910a4efdf5"; - }; - + src = svnSrc "akode" "0xkzv386wvh16njjv8z84mg3czp7j7n60lwhwns5fwqhx1s30h5y"; buildInputs = [ cmake qt openssl gettext cyrus_sasl alsaLib ]; } diff --git a/pkgs/desktops/kde-4/support/default.nix b/pkgs/desktops/kde-4/support/default.nix index af1dc175bed..426a5811bd7 100644 --- a/pkgs/desktops/kde-4/support/default.nix +++ b/pkgs/desktops/kde-4/support/default.nix @@ -1,36 +1,22 @@ -args: +oldArgs: +let + args = oldArgs // { + svnSrc = name: hash: + oldArgs.fetchsvn { + url = "svn://anonsvn.kde.org/home/kde/trunk/kdesupport/${name}"; + rev = 747269; + sha256 = hash; + }; + }; +in rec { - qca = (import ./qca.nix) args; akode = (import ./akode.nix) args; - gmm = (import ./gmm.nix) args; eigen = (import ./eigen.nix) args; - taglib = (import ./taglib.nix) args; + gmm = (import ./gmm.nix) args; + qca = (import ./qca.nix) args; + qimageblitz = (import ./qimageblitz.nix) args; soprano = (import ./soprano.nix) args; strigi = (import ./strigi.nix) args; - qimageblitz = (import ./qimageblitz.nix) args; + taglib = (import ./taglib.nix) args; all = [qca gmm eigen taglib soprano strigi qimageblitz]; } -#args: with args; -# -#stdenv.mkDerivation { -# name = "kdesupport-4.0svn-r729462"; -# -# src = fetchsvn { -# url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport; -# rev = 729462; -# md5 = "aa50ec8e5c8d49e1dfd53143345cb4b3"; -# }; -# -# propagatedBuildInputs = [ -# exiv2 -# cmake inputproto kbproto scrnsaverproto xextproto xf86miscproto xf86vidmodeproto -# xineramaproto xproto libICE libX11 libXau libXcomposite libXcursor -# libXdamage libXdmcp libXext libXfixes libXft libXi libXpm libXrandr -# libXrender libXScrnSaver libXt libXtst libXv libXxf86misc libxkbfile zlib -# perl qt openssl pcre pkgconfig libjpeg libpng libtiff libxml2 libxslt expat -# libtool freetype bzip2 shared_mime_info alsaLib libungif cups -# gettext cluceneCore redland stdenv.gcc.libc dbus bison cppunit -# ]; -# CLUCENE_HOME=cluceneCore; -# patchPhase = "sed -e '/set(qca_PLUGINSDIR/s@\${QT_PLUGINS_DIR}@\${CMAKE_INSTALL_PREFIX}/plugins@' -i ../qca/CMakeLists.txt"; -#} diff --git a/pkgs/desktops/kde-4/support/eigen.nix b/pkgs/desktops/kde-4/support/eigen.nix index a3ac9eff391..163683a2921 100644 --- a/pkgs/desktops/kde-4/support/eigen.nix +++ b/pkgs/desktops/kde-4/support/eigen.nix @@ -2,12 +2,6 @@ args: with args; stdenv.mkDerivation { name = "eigen-1.0.5"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/eigen; - rev = 732646; - md5 = "f91ad5d3dd992984fb61107fd9050a36"; - }; - + src = svnSrc "eigen" "0dr2gzrf17bdgxj4f9ibk7x5j7fqwwjsl800dzfvrhgj6v1mxm4x"; buildInputs = [ cmake ]; } diff --git a/pkgs/desktops/kde-4/support/gmm.nix b/pkgs/desktops/kde-4/support/gmm.nix index d32c9b9f765..843f9f6aaed 100644 --- a/pkgs/desktops/kde-4/support/gmm.nix +++ b/pkgs/desktops/kde-4/support/gmm.nix @@ -2,12 +2,6 @@ args: with args; stdenv.mkDerivation { name = "gmm-svn"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/gmm; - rev = 732646; - md5 = "09ee4cfcbb3c428bc681c2da022648bf"; - }; - + src = svnSrc "gmm" "0qvx9jf17z0mpwy8k6w6bla94gkkslkiv5w98aajfcq34n0zxcpc"; buildInputs = [ cmake ]; } diff --git a/pkgs/desktops/kde-4/support/qca.nix b/pkgs/desktops/kde-4/support/qca.nix index 64b00da91ce..fda435c7bff 100644 --- a/pkgs/desktops/kde-4/support/qca.nix +++ b/pkgs/desktops/kde-4/support/qca.nix @@ -2,14 +2,7 @@ args: with args; stdenv.mkDerivation { name = "qca-2.0.0dev"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca; - rev = 732646; - md5 = "1df54bf3bf327b14ea1948f9080717c3"; - }; - + src = svnSrc "qca" "0dycmk8fn57mz2pfxck6d0g833fqg9zrw17789vxb4ks0xz0p3zp"; buildInputs = [ cmake qt openssl gettext cyrus_sasl libgcrypt gnupg ]; - patchPhase = "sed -e '/set(qca_PLUGINSDIR/s@\${QT_PLUGINS_DIR}@\${CMAKE_INSTALL_PREFIX}/plugins@' -i ../CMakeLists.txt"; } diff --git a/pkgs/desktops/kde-4/support/qimageblitz.nix b/pkgs/desktops/kde-4/support/qimageblitz.nix index fe6a03ca7c7..3364b4eac5d 100644 --- a/pkgs/desktops/kde-4/support/qimageblitz.nix +++ b/pkgs/desktops/kde-4/support/qimageblitz.nix @@ -2,12 +2,6 @@ args: with args; stdenv.mkDerivation { name = "qimageblitz-4.0.0svn"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qimageblitz; - rev = 732646; - md5 = "c37fa505368071ec501e966225e30c78"; - }; - + src = svnSrc "qimageblitz" "0gi78bald70bc540jqcpa70x23hycywibn4raf5602hv4d5n8mnx"; buildInputs = [cmake qt]; } diff --git a/pkgs/desktops/kde-4/support/soprano.nix b/pkgs/desktops/kde-4/support/soprano.nix index 0f453d726d7..0cb490b9db7 100644 --- a/pkgs/desktops/kde-4/support/soprano.nix +++ b/pkgs/desktops/kde-4/support/soprano.nix @@ -2,13 +2,7 @@ args: with args; stdenv.mkDerivation { name = "soprano-1.9.0svn"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/soprano; - rev = 732646; - md5 = "c3b43544536f0f8061e4afeb9e368072"; - }; - + src = svnSrc "soprano" "02xfp7g41ahxwczkxipyi13rav6akhwgspxdhgk5gm94rg10hq2l"; CLUCENE_HOME=cluceneCore; buildInputs = [ cmake qt cluceneCore redland ]; } diff --git a/pkgs/desktops/kde-4/support/strigi.nix b/pkgs/desktops/kde-4/support/strigi.nix index f0e0fe614be..d1ec98ea25f 100644 --- a/pkgs/desktops/kde-4/support/strigi.nix +++ b/pkgs/desktops/kde-4/support/strigi.nix @@ -2,13 +2,7 @@ args: with args; stdenv.mkDerivation { name = "strigi-svn"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/strigi; - rev = 732646; - md5 = "15762f5a406ef84bc1cdd776b2ca9a82"; - }; - + src = svnSrc "strigi" "0dp145n93bqp91lvk2n10mghppyhdm3anh1l3a18d20hrvsm42z5"; CLUCENE_HOME=cluceneCore; buildInputs = [ cmake zlib cluceneCore bzip2 libxml2 qt dbus log4cxx stdenv.gcc.libc exiv2 bison cppunit perl ]; diff --git a/pkgs/desktops/kde-4/support/taglib.nix b/pkgs/desktops/kde-4/support/taglib.nix index 6aecb7a91ef..9a2acc96636 100644 --- a/pkgs/desktops/kde-4/support/taglib.nix +++ b/pkgs/desktops/kde-4/support/taglib.nix @@ -2,12 +2,6 @@ args: with args; stdenv.mkDerivation { name = "taglib-1.4svn"; - - src = fetchsvn { - url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib; - rev = 732646; - md5 = "647d68a76858cf3a667656c486b0a8c2"; - }; - + src = svnSrc "taglib" "1myfgykflbs3l1mrzg4iv8rb1mbd0vpmzl5dnnslfi9b0xg6ydip"; buildInputs = [ cmake zlib ]; } diff --git a/pkgs/development/compilers/gcc-4.1/default.nix b/pkgs/development/compilers/gcc-4.1/default.nix index e6d5452512e..621f96e49f9 100644 --- a/pkgs/development/compilers/gcc-4.1/default.nix +++ b/pkgs/development/compilers/gcc-4.1/default.nix @@ -15,18 +15,18 @@ stdenv.mkDerivation ({ builder = if langF77 then ./fortran.sh else ./builder.sh; src = - [(fetchurl { + optional /*langC*/ true (fetchurl { url = mirror://gnu/gcc/gcc-4.1.2/gcc-core-4.1.2.tar.bz2; sha256 = "07binc1hqlr0g387zrg5sp57i12yzd5ja2lgjb83bbh0h3gwbsbv"; - })] ++ - (if /*langCC*/ true then [(fetchurl { + }) ++ + optional /*langCC*/ true (fetchurl { url = mirror://gnu/gcc/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2; sha256 = "1qm2izcxna10jai0v4s41myki0xkw9174qpl6k1rnrqhbx0sl1hc"; - })] else []) ++ - (if langF77 then [(fetchurl { + }) ++ + optional langF77 (fetchurl { url = mirror://gnu/gcc/gcc-4.1.2/gcc-fortran-4.1.2.tar.bz2; sha256 = "0772dhmm4gc10420h0d0mfkk2sirvjmjxz8j0ywm8wp5qf8vdi9z"; - })] else []); + }); patches = optional noSysDirs [./no-sys-dirs.patch]; diff --git a/pkgs/development/compilers/gcc-4.2/builder.sh b/pkgs/development/compilers/gcc-4.2/builder.sh index c17d0403702..ee11e974a40 100644 --- a/pkgs/development/compilers/gcc-4.2/builder.sh +++ b/pkgs/development/compilers/gcc-4.2/builder.sh @@ -40,6 +40,7 @@ if test "$noSysDirs" = "1"; then done makeFlagsArray=( \ + "${makeFlagsArray[@]}" \ NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \ LIMITS_H_TEST=true \ @@ -68,18 +69,30 @@ postInstall() { # Remove `fixincl' to prevent a retained dependency on the # previous gcc. rm -rf $out/libexec/gcc/*/*/install-tools + rm -rf $out/lib/gcc/*/*/install-tools # Get rid of some "fixed" header files rm -rf $out/lib/gcc/*/*/include/root + + # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks. + for i in $out/bin/*-gcc*; do + if cmp -s $out/bin/gcc $i; then + ln -sfn gcc $i + fi + done + + for i in $out/bin/*-c++* $out/bin/*-g++*; do + if cmp -s $out/bin/g++ $i; then + ln -sfn g++ $i + fi + done } -if test -z "$staticCompiler"; then - if test -z "$profiledCompiler"; then - buildFlags="bootstrap $buildFlags" - else - buildFlags="profiledbootstrap $buildFlags" - fi +if test -z "$profiledCompiler"; then + buildFlags="bootstrap $buildFlags" +else + buildFlags="profiledbootstrap $buildFlags" fi genericBuild diff --git a/pkgs/development/compilers/gcc-4.2/default.nix b/pkgs/development/compilers/gcc-4.2/default.nix index 2681531f204..7fcf7717c5a 100644 --- a/pkgs/development/compilers/gcc-4.2/default.nix +++ b/pkgs/development/compilers/gcc-4.2/default.nix @@ -8,22 +8,24 @@ assert langC; with import ../../../lib; +let version = "4.2.3"; in + stdenv.mkDerivation { - name = "gcc-4.2.0"; + name = "gcc-${version}"; builder = ./builder.sh; src = optional /*langC*/ true (fetchurl { - url = mirror://gnu/gcc/gcc-4.2.0/gcc-core-4.2.0.tar.bz2; - sha256 = "0ykhzxhr8857dr97z0j9wyybfz1kjr71xk457cfapfw5fjas4ny1"; + url = "mirror://gnu/gcc/gcc-${version}/gcc-core-${version}.tar.bz2"; + sha256 = "04y84s46wzy4h44hpacf7vyla7b5zfc1qvdq3myvrhp82cp0bv4r"; }) ++ - optional /*langCC*/ true (fetchurl { - url = mirror://gnu/gcc/gcc-4.2.0/gcc-g++-4.2.0.tar.bz2; - sha256 = "0k5ribrfdp9vmljxrglcgx2j2r7xnycd1rvd8sny2y5cj0l8ps12"; + optional langCC (fetchurl { + url = "mirror://gnu/gcc/gcc-${version}/gcc-g++-${version}.tar.bz2"; + sha256 = "0spzz549fifwv02ym33azzwizl0zkq5m1fgy88ccmcyzmwpgyzfq"; }) ++ optional langF77 (fetchurl { - url = mirror://gnu/gcc/gcc-4.2.0/gcc-fortran-4.2.0.tar.bz2; - sha256 = "0vw07qv6qpa5cgxc0qxraq6li2ibh8zrp65jrg92v4j63ivvi3hh"; + url = "mirror://gnu/gcc/gcc-${version}/gcc-fortran-${version}.tar.bz2"; + sha256 = "1l3ww6qymrkcfqlssb41a5fdnh6w2hqk0v2ijx56jgjbdnzawyp0"; }); patches = @@ -47,7 +49,7 @@ stdenv.mkDerivation { ${if stdenv.isi686 then "--with-arch=i686" else ""} "; - makeFlags = if staticCompiler then "LDFLAGS=-static" else ""; + NIX_EXTRA_LDFLAGS = if staticCompiler then "-static" else ""; passthru = { inherit langC langCC langF77; }; diff --git a/pkgs/development/compilers/gcc-4.2/no-sys-dirs.patch b/pkgs/development/compilers/gcc-4.2/no-sys-dirs.patch index d87f54669b7..f1d429e274a 100644 --- a/pkgs/development/compilers/gcc-4.2/no-sys-dirs.patch +++ b/pkgs/development/compilers/gcc-4.2/no-sys-dirs.patch @@ -120,26 +120,6 @@ diff -rc gcc-4.2.0-orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c static const char *md_exec_prefix = MD_EXEC_PREFIX; static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; -diff -rc gcc-4.2.0-orig/ltcf-cxx.sh gcc-4.2.0/ltcf-cxx.sh -*** gcc-4.2.0-orig/ltcf-cxx.sh 2005-07-16 04:30:53.000000000 +0200 ---- gcc-4.2.0/ltcf-cxx.sh 2007-05-20 17:16:44.000000000 +0200 -*************** -*** 989,995 **** - # the conftest object file. - pre_test_object_deps_done=no - -! for p in `eval $output_verbose_link_cmd`; do - - case $p in - ---- 989,995 ---- - # the conftest object file. - pre_test_object_deps_done=no - -! for p in `true`; do - - case $p in - diff -rc gcc-4.2.0-orig/ltconfig gcc-4.2.0/ltconfig *** gcc-4.2.0-orig/ltconfig 2007-02-14 18:08:35.000000000 +0100 --- gcc-4.2.0/ltconfig 2007-05-20 22:16:24.000000000 +0200 diff --git a/pkgs/development/compilers/ocaml/default.nix b/pkgs/development/compilers/ocaml/default.nix index f058db31364..837a685198b 100644 --- a/pkgs/development/compilers/ocaml/default.nix +++ b/pkgs/development/compilers/ocaml/default.nix @@ -1,7 +1,7 @@ args: args.stdenv.lib.listOfListsToAttrs [ - [ "3.08.0" (import ./3.08.0.nix (args // {stdenv = args.stdenv34;})) ] + [ "3.08.0" (import ./3.08.0.nix args) ] [ "3.09.1" (import ./3.09.1.nix args) ] - [ "3.10.0" (import ./3.10.0.nix (args // {stdenv = args.stdenvUsingSetupNew2;})) ] + [ "3.10.0" (import ./3.10.0.nix args) ] [ "default" (import ./3.09.1.nix args) ] ] diff --git a/pkgs/development/interpreters/erlang/R11B-5.nix b/pkgs/development/interpreters/erlang/R11B-5.nix new file mode 100644 index 00000000000..68cc3b5f2b5 --- /dev/null +++ b/pkgs/development/interpreters/erlang/R11B-5.nix @@ -0,0 +1,12 @@ +args: with args; + +stdenv.mkDerivation { + name = "erlang-" + version; + src = fetchurl { + url = http://www.erlang.org/download/otp_src_R11B-5.tar.gz; + md5 = "96acec41da87d6ee0ef18e1aab36ffdd"; + }; + buildInputs = [perl gnum4 ncurses openssl]; + patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; + configureFlags = "--with-ssl=${openssl}"; +} diff --git a/pkgs/development/interpreters/erlang/R12B-1.nix b/pkgs/development/interpreters/erlang/R12B-1.nix new file mode 100644 index 00000000000..37ebdbf6ab8 --- /dev/null +++ b/pkgs/development/interpreters/erlang/R12B-1.nix @@ -0,0 +1,12 @@ +args: with args; + +stdenv.mkDerivation { + name = "erlang-" + version; + src = fetchurl { + url = "http://www.erlang.org/download/otp_src_" + version + ".tar.gz"; + sha256 = "16w7snhbjzwiywppsp04yiy2bkncff8pf4i643kqzkqx578jhaqz"; + }; + buildInputs = [perl gnum4 ncurses openssl]; + patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; + configureFlags = "--with-ssl=${openssl}"; +} diff --git a/pkgs/development/interpreters/erlang/builder.sh b/pkgs/development/interpreters/erlang/builder.sh deleted file mode 100644 index 43c964d88b8..00000000000 --- a/pkgs/development/interpreters/erlang/builder.sh +++ /dev/null @@ -1,14 +0,0 @@ -buildInputs="$perl $gnum4 $ncurses $openssl" - -source $stdenv/setup - -tar xfvz $src -cd otp_src_* - -# Fix some hard coded paths to /bin/rm -sed -i -e "s|/bin/rm|rm|" lib/odbc/configure -sed -i -e "s|/bin/rm|rm|" erts/configure - -./configure --prefix=$out --with-ssl=$openssl -make -make install diff --git a/pkgs/development/interpreters/erlang/default.nix b/pkgs/development/interpreters/erlang/default.nix deleted file mode 100644 index f8caed7f329..00000000000 --- a/pkgs/development/interpreters/erlang/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{stdenv, fetchurl, perl, ncurses, gnum4, openssl}: - -stdenv.mkDerivation { - name = "erlang-R11B-5"; - builder = ./builder.sh; - src = fetchurl { - url = http://www.erlang.org/download/otp_src_R11B-5.tar.gz; - md5 = "96acec41da87d6ee0ef18e1aab36ffdd"; - }; - inherit perl ncurses gnum4 openssl; -} diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index b9416bcc41f..f43578cdc33 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -9,13 +9,19 @@ stdenv.mkDerivation { sha256 = "1j8vzc6lva49mwdxkzhvm78dkxyprqs4n4057amqvsh4kh6i92l1"; }; - # This patch does the following: - # 1) Do use the PATH environment variable to find the `pwd' command. - # By default, Perl will only look for it in /lib and /usr/lib. - # !!! what are the security implications of this? - # 2) Force the use of , not /usr/include/errno.h, on Linux - # systems. (This actually appears to be due to a bug in Perl.) - patches = [./no-sys-dirs.patch]; + patches = [ + # This patch does the following: + # 1) Do use the PATH environment variable to find the `pwd' command. + # By default, Perl will only look for it in /lib and /usr/lib. + # !!! what are the security implications of this? + # 2) Force the use of , not /usr/include/errno.h, on Linux + # systems. (This actually appears to be due to a bug in Perl.) + ./no-sys-dirs.patch + + # Patch to make Perl 5.8.8 build with GCC 4.2. Taken from + # http://www.nntp.perl.org/group/perl.perl5.porters/2006/11/msg117738.html + ./gcc-4.2.patch + ]; setupHook = ./setup-hook.sh; } diff --git a/pkgs/development/interpreters/perl/gcc-4.2.patch b/pkgs/development/interpreters/perl/gcc-4.2.patch new file mode 100644 index 00000000000..679a7abde3b --- /dev/null +++ b/pkgs/development/interpreters/perl/gcc-4.2.patch @@ -0,0 +1,10 @@ +--- perl-5.8.x/makedepend.SH 2006-06-13 15:31:22.000000000 -0400 ++++ perl-5.8.x-andy/makedepend.SH 2006-07-25 14:45:11.000000000 -0400 +@@ -167,6 +167,7 @@ + -e '/^#.*/d' \ + -e '/^#.*/d' \ + -e '/^#.*/d' \ ++ -e '/^#.*/d' \ + -e '/^#.*"-"/d' \ + -e '/: file path prefix .* never used$/d' \ + -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ diff --git a/pkgs/development/interpreters/perl/setup-hook.sh b/pkgs/development/interpreters/perl/setup-hook.sh index 1f05581df97..70ce2cf8b46 100644 --- a/pkgs/development/interpreters/perl/setup-hook.sh +++ b/pkgs/development/interpreters/perl/setup-hook.sh @@ -1,7 +1,5 @@ addPerlLibPath () { - if test -d $1/lib/site_perl; then - export PERL5LIB="${PERL5LIB}${PERL5LIB:+:}$1/lib/site_perl" - fi + addToSearchPath PERL5LIB /lib/site_perl "" $1 } envHooks=(${envHooks[@]} addPerlLibPath) diff --git a/pkgs/development/interpreters/python/2.5/default.nix b/pkgs/development/interpreters/python/2.5/default.nix index 9a84bfa7ff8..161584ee707 100644 --- a/pkgs/development/interpreters/python/2.5/default.nix +++ b/pkgs/development/interpreters/python/2.5/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs); LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs); - configureFlags = "--enable-shared"; + configureFlags = "--enable-shared --with-wctype-functions"; preConfigure = " # Purity. diff --git a/pkgs/development/interpreters/python/2.5/setup-hook.sh b/pkgs/development/interpreters/python/2.5/setup-hook.sh index 11551235c1f..a11f8cbb484 100644 --- a/pkgs/development/interpreters/python/2.5/setup-hook.sh +++ b/pkgs/development/interpreters/python/2.5/setup-hook.sh @@ -1,8 +1,5 @@ addPythonPath() { - local p=$1/lib/python2.5/site-packages - if test -d $p; then - export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p" - fi + addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.5/site-packages "" $1 } toPythonPath() { diff --git a/pkgs/development/interpreters/python/setup-hook.sh b/pkgs/development/interpreters/python/setup-hook.sh index 3bc86c58229..58b8d1cab76 100644 --- a/pkgs/development/interpreters/python/setup-hook.sh +++ b/pkgs/development/interpreters/python/setup-hook.sh @@ -1,8 +1,5 @@ addPythonPath() { - local p=$1/lib/python2.4/site-packages - if test -d $p; then - export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p" - fi + addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.4/site-packages "" $1 } toPythonPath() { diff --git a/pkgs/development/libraries/a52dec/default.nix b/pkgs/development/libraries/a52dec/default.nix index 4a75e11ec30..46dfe38c455 100644 --- a/pkgs/development/libraries/a52dec/default.nix +++ b/pkgs/development/libraries/a52dec/default.nix @@ -1,9 +1,15 @@ -{stdenv, fetchurl}: +args: with args; -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "a52dec-0.7.4"; src = fetchurl { - url = http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz; - md5 = "caa9f5bc44232dc8aeea773fea56be80"; + url = "${meta.homepage}/files/a52dec-0.7.4.tar.gz"; + sha256 = "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"; + }; + + configureFlags = "--enable-shared --disable-static"; + + meta = { + homepage = http://liba52.sourceforge.net; }; } diff --git a/pkgs/development/libraries/aterm/2.4.2-fixes.nix b/pkgs/development/libraries/aterm/2.4.2-fixes.nix index 3144154c9e6..7c70afc621b 100644 --- a/pkgs/development/libraries/aterm/2.4.2-fixes.nix +++ b/pkgs/development/libraries/aterm/2.4.2-fixes.nix @@ -6,6 +6,7 @@ stdenv.mkDerivation { url = http://losser.st-lab.cs.uu.nl/~eelco/dist/aterm-2.4.2-fixes-r2.tar.bz2; sha256 = "1w3bxdpc2hz29li5ssmdcz3x0fn47r7g62ns0v8nazxwf40vff4j"; }; + doCheck = true; meta = { homepage = http://www.cwi.nl/htbin/sen1/twiki/bin/view/SEN1/ATerm; license = "LGPL"; diff --git a/pkgs/development/libraries/avahi/0.6.21.nix b/pkgs/development/libraries/avahi/0.6.21.nix new file mode 100644 index 00000000000..26f03ca58bf --- /dev/null +++ b/pkgs/development/libraries/avahi/0.6.21.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "0q954lwhr6xnv7chhi4bqlmkn4nx9shyw0mbdr3n26018dgw65yq" args diff --git a/pkgs/development/libraries/avahi/0.6.22.nix b/pkgs/development/libraries/avahi/0.6.22.nix new file mode 100644 index 00000000000..93b7184cdae --- /dev/null +++ b/pkgs/development/libraries/avahi/0.6.22.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "0lnxzsdhihb3kjwd3vcrl9pq6ykfbp0vy9ja0mch01ffnrqgiilx" args diff --git a/pkgs/development/libraries/avahi/common.nix b/pkgs/development/libraries/avahi/common.nix new file mode 100644 index 00000000000..1ebadc26e26 --- /dev/null +++ b/pkgs/development/libraries/avahi/common.nix @@ -0,0 +1,18 @@ +sha256: args: with args; + +stdenv.mkDerivation rec { + name = "avahi-" + version; + src = fetchurl { + url = "${meta.homepage}/download/${name}.tar.gz"; + inherit sha256; + }; + + buildInputs = [pkgconfig libdaemon dbus perl perlXMLParser glib qt4]; + + configureFlags = "--disable-qt3 --disable-gdbm --disable-gtk --disable-mono + --with-distro=none --enable-shared --disable-static --disable-python"; + + meta = { + homepage = http://avahi.org; + }; +} diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix deleted file mode 100644 index c8a94c0dbb1..00000000000 --- a/pkgs/development/libraries/avahi/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{stdenv, fetchurl, pkgconfig, libdaemon, dbus}: - -stdenv.mkDerivation { - name = "avahi-0.6.21"; - src = fetchurl { - url = http://avahi.org/download/avahi-0.6.21.tar.gz; - sha256 = "d817c35f43011861476eab02eea14edd123b2bc58b4408d9d9b69b0c39252561"; - }; - - #buildInputs = [pkgconfig glib gtk libpng libglade]; - buildInputs = [pkgconfig libdaemon dbus]; - - configureFlags = "--disable-glib --disable-qt3 --disable-qt4 --disable-gtk --disable-expat --disable-gdbm --disable-python --disable-mono --with-distro=none CPPFLAGS=-Ddbus_watch_get_unix_fd=dbus_watch_get_fd"; -} diff --git a/pkgs/development/libraries/boost/default.nix b/pkgs/development/libraries/boost/default.nix index 5040a763ab8..fe4cdcf0337 100644 --- a/pkgs/development/libraries/boost/default.nix +++ b/pkgs/development/libraries/boost/default.nix @@ -10,5 +10,6 @@ stdenv.mkDerivation { preConfigure=" sed -e 's@^BJAM_CONFIG=\"\"@BJAM_CONFIG=\"--layout=system release threading=multi link=shared\"@g' -i configure "; + patches = [./gcc-4.2.patch]; configureFlags="--with-icu=${icu}"; } diff --git a/pkgs/development/libraries/boost/gcc-4.2.patch b/pkgs/development/libraries/boost/gcc-4.2.patch new file mode 100644 index 00000000000..6c2210d831d --- /dev/null +++ b/pkgs/development/libraries/boost/gcc-4.2.patch @@ -0,0 +1,11 @@ +Index: trunk/tools/jam/src/build.jam +=================================================================== +--- trunk/tools/jam/src/build.jam (revision 40095) ++++ trunk/tools/jam/src/build.jam (revision 41036) +@@ -176,5 +176,5 @@ + ## GCC 2.x, 3.x, 4.x + toolset gcc gcc : "-o " : -D +- : -pedantic ++ : -pedantic -fno-strict-aliasing + [ opt --release : [ opt --symbols : -g : -s ] -O3 ] + [ opt --debug : -g -O0 -fno-inline ] diff --git a/pkgs/development/libraries/cairomm/default.nix b/pkgs/development/libraries/cairomm/default.nix new file mode 100644 index 00000000000..a22788c288e --- /dev/null +++ b/pkgs/development/libraries/cairomm/default.nix @@ -0,0 +1,15 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "cairomm-1.4.6"; + + src = fetchurl { + url = "http://cairographics.org/releases/${name}.tar.gz"; + sha256 = "1zd5pq5jd507w1v994awpsl7m26g4dfl0rwgrxig2823hl3rqmrp"; + }; + + buildInputs = [pkgconfig]; + propagatedBuildInputs = [cairo x11 fontconfig freetype]; + + configureFlags = "--enable-shared --disable-static"; +} diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 8324980126c..9a9851521b4 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -6,9 +6,10 @@ stdenv.mkDerivation rec { url = "${meta.homepage}/releases/dbus-glib/${name}.tar.gz"; sha256 = "1qmbnd9xgg7vahlfywd8sfd9yqhx8jdyczz3cshfsd4qc76xhw78"; }; - inherit dbus glib; - buildInputs = [pkgconfig gettext glib expat]; - propagatedBuildInputs = [dbus]; + buildInputs = [pkgconfig expat gettext]; + propagatedBuildInputs = [dbus.libs glib]; + configureFlags = "--enable-shared --disable-static"; + passthru = { inherit dbus glib; }; meta = { homepage = http://dbus.freedesktop.org; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index cd4b8f49e05..b60705f21f6 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,22 +1,42 @@ -{stdenv, fetchurl, pkgconfig, expat}: - -stdenv.mkDerivation { - name = "dbus-1.0.2"; +args: with args; +let + version = "1.0.2"; src = fetchurl { - url = http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz; + url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; sha256 = "1jn652zb81mczsx4rdcwrrzj3lfhx9d107zjfnasc4l5yljl204a"; }; - buildInputs = [pkgconfig expat]; - configureFlags = "--without-x --localstatedir=/var"; + configureFlags = "--disable-static --localstatedir=/var --with-session-socket-dir=/tmp"; +in rec { + libs = stdenv.mkDerivation { + name = "dbus-library-" + version; + buildInputs = [pkgconfig expat]; + inherit src configureFlags; + patchPhase = '' + sed -i /mkinstalldirs.*localstatedir/d bus/Makefile.in + sed -i '/SUBDIRS/s/ tools//' Makefile.in + ''; + }; - # Awful hack: `make install' wants to write in /var, but it - # can't. So redirect it with a DESTDIR. - preInstall = " - installFlagsArray=(DESTDIR=$out/destdir) - "; + tools = stdenv.mkDerivation { + name = "dbus-tools-" + version; + inherit src configureFlags; + buildInputs = [pkgconfig expat libs] + ++ (if useX11 then [libX11 libICE libSM] else []); + postConfigure = "cd tools"; - postInstall = " - mv $out/destdir/$out/* $out - rm -rf $out/destdir - "; + NIX_LDFLAGS = "-ldbus-1"; + makeFlags = "DBUS_DAEMONDIR=${daemon}/bin"; + + patchPhase = '' + sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in + sed -i '/mkdir.*localstate/d' tools/Makefile.in + ''; + }; + +# I'm too lazy to separate daemon and libs now. + daemon = libs; + + # FIXME TODO + # After merger it will be better to correct upstart-job instead. + outPath = daemon.outPath; } diff --git a/pkgs/development/libraries/dbus_x/default.nix b/pkgs/development/libraries/dbus_x/default.nix deleted file mode 100644 index dfe3ea0ee7e..00000000000 --- a/pkgs/development/libraries/dbus_x/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -args: with args; - -stdenv.mkDerivation { - name = "dbus-1.0.2"; - src = fetchurl { - url = http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz; - sha256 = "1jn652zb81mczsx4rdcwrrzj3lfhx9d107zjfnasc4l5yljl204a"; - }; - buildInputs = [pkgconfig expat libX11 libICE libSM]; - - configureFlags = "--with-x --disable-static --localstatedir=/var --with-session-socket-dir=/tmp"; - patchPhase = "sed -e /mkinstalldirs.*localstatedir/d -i bus/Makefile.in"; -} diff --git a/pkgs/development/libraries/enchant/1.3.0.nix b/pkgs/development/libraries/enchant/1.3.0.nix new file mode 100644 index 00000000000..e503366087e --- /dev/null +++ b/pkgs/development/libraries/enchant/1.3.0.nix @@ -0,0 +1,14 @@ +args: with args; +stdenv.mkDerivation rec { + name = "enchant-" + version; + src = fetchurl { + url = "http://www.abisource.com/downloads/enchant/${version}/${name}.tar.gz"; + sha256 = "1vwqwsadnp4rf8wj7d4rglvszjzlcli0jyxh06h8inka1sm1al76"; + }; + buildInputs = [aspell pkgconfig glib]; + configureFlags = "--enable-shared --disable-static"; + + meta = { + homepage = http://www.abisource.com/enchant; + }; +} diff --git a/pkgs/development/libraries/enchant/default.nix b/pkgs/development/libraries/enchant/default.nix deleted file mode 100644 index 74fe33cba8c..00000000000 --- a/pkgs/development/libraries/enchant/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -args: with args; -stdenv.mkDerivation { - name = "enchant-1.3.0"; - src = fetchurl { - url = http://FIXME/enchant-1.3.0.tar.gz; - sha256 = "1vwqwsadnp4rf8wj7d4rglvszjzlcli0jyxh06h8inka1sm1al76"; - }; - buildInputs = [aspell pkgconfig glib]; - configureFlags = "--enable-shared --disable-static"; -} diff --git a/pkgs/development/libraries/freeglut/default.nix b/pkgs/development/libraries/freeglut/default.nix index 704dc0005fb..19720b9d677 100644 --- a/pkgs/development/libraries/freeglut/default.nix +++ b/pkgs/development/libraries/freeglut/default.nix @@ -9,4 +9,5 @@ stdenv.mkDerivation { }; buildInputs = [x11 mesa]; + patches = ./freeglut-gcc-4.2.patch; } diff --git a/pkgs/development/libraries/freeglut/freeglut-gcc-4.2.patch b/pkgs/development/libraries/freeglut/freeglut-gcc-4.2.patch new file mode 100644 index 00000000000..1642affba91 --- /dev/null +++ b/pkgs/development/libraries/freeglut/freeglut-gcc-4.2.patch @@ -0,0 +1,13 @@ +diff -urN freeglut-2.4.0.old/src/freeglut_joystick.c freeglut-2.4.0/src/freeglut_joystick.c +--- freeglut-2.4.0.old/src/freeglut_joystick.c 2007-06-16 03:51:41.000000000 +0000 ++++ freeglut-2.4.0/src/freeglut_joystick.c 2007-06-16 03:54:27.000000000 +0000 +@@ -1682,9 +1682,6 @@ + + fgInitialiseJoysticks (); + +- if ( !fgJoystick ) +- return 0; +- + if ( !fgState.JoysticksInitialised ) + return 0; + diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix deleted file mode 100644 index b3f7f46a0ff..00000000000 --- a/pkgs/development/libraries/gettext/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -args: -args.stdenv.lib.listOfListsToAttrs [ - [ "recurseForDerivations" true ] - [ "0.14.6" (import ./0.14.6.nix args) ] - [ "0.15" (import ./0.15.nix args) ] - [ "0.16.x" (import ./0.16.x.nix args) ] - [ "default" (import ./0.14.6.nix args) ] -] diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc-2.5/builder.sh similarity index 100% rename from pkgs/development/libraries/glibc/builder.sh rename to pkgs/development/libraries/glibc-2.5/builder.sh diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc-2.5/default.nix similarity index 100% rename from pkgs/development/libraries/glibc/default.nix rename to pkgs/development/libraries/glibc-2.5/default.nix diff --git a/pkgs/development/libraries/glibc-nptl/glibc-getcwd-param-MAX.patch b/pkgs/development/libraries/glibc-2.5/glibc-getcwd-param-MAX.patch similarity index 100% rename from pkgs/development/libraries/glibc-nptl/glibc-getcwd-param-MAX.patch rename to pkgs/development/libraries/glibc-2.5/glibc-getcwd-param-MAX.patch diff --git a/pkgs/development/libraries/glibc-nptl/glibc-pwd.patch b/pkgs/development/libraries/glibc-2.5/glibc-pwd.patch similarity index 100% rename from pkgs/development/libraries/glibc-nptl/glibc-pwd.patch rename to pkgs/development/libraries/glibc-2.5/glibc-pwd.patch diff --git a/pkgs/development/libraries/glibc-nptl/builder.sh b/pkgs/development/libraries/glibc-2.7/builder.sh similarity index 67% rename from pkgs/development/libraries/glibc-nptl/builder.sh rename to pkgs/development/libraries/glibc-2.7/builder.sh index e4f6dec1354..f9b9c6b87aa 100644 --- a/pkgs/development/libraries/glibc-nptl/builder.sh +++ b/pkgs/development/libraries/glibc-2.7/builder.sh @@ -12,10 +12,18 @@ preConfigure=preConfigure preConfigure() { for i in configure io/ftwtest-sh; do - substituteInPlace "$i" \ - --replace "@PWD@" "pwd" + # Can't use substituteInPlace here because replace hasn't been + # built yet in the bootstrap. + sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" done + # In the glibc 2.6/2.7 tarballs C-translit.h is a little bit older + # than C-translit.h.in, forcing Make to rebuild it unnecessarily. + # This wouldn't be problem except that it requires Perl, which we + # don't want as a dependency in the Nixpkgs bootstrap. So force + # the output file to be newer. + touch locale/C-translit.h + mkdir ../build cd ../build diff --git a/pkgs/development/libraries/glibc-nptl/default.nix b/pkgs/development/libraries/glibc-2.7/default.nix similarity index 50% rename from pkgs/development/libraries/glibc-nptl/default.nix rename to pkgs/development/libraries/glibc-2.7/default.nix index 86cc9ecf565..f33f95fda9f 100644 --- a/pkgs/development/libraries/glibc-nptl/default.nix +++ b/pkgs/development/libraries/glibc-2.7/default.nix @@ -1,31 +1,32 @@ -{ stdenv, fetchurl, kernelHeaders -,perl +{ stdenv, fetchurl, kernelHeaders , installLocales ? true , profilingLibraries ? false }: stdenv.mkDerivation { - name = "glibc-2.6.1-nptl"; + name = "glibc-2.7"; builder = ./builder.sh; - src = - fetchurl { - url = http://ftp.gnu.org/gnu/glibc/glibc-2.6.1.tar.bz2; - sha256 = "08pcfsi9zpikjakljklks2ln3hn7544cr9br4kbh5kx27cy3mv9x"; - }; - - patches = [ ./glibc-pwd.patch ./glibc-getcwd-param-MAX.patch ]; + src = fetchurl { + url = mirror://gnu/glibc/glibc-2.7.tar.bz2; + sha256 = "06j5q20l11x8kcrl9bg15xgb1pw0w82pazikxf4zvq2fmhiaa922"; + }; inherit kernelHeaders installLocales; inherit (stdenv) is64bit; - buildInputs=[perl]; - # `--with-tls --without-__thread' enables support for TLS but causes # it not to be used. Required if we don't want to barf on 2.4 # kernels. Or something. configureFlags="--enable-add-ons --with-headers=${kernelHeaders}/include ${if profilingLibraries then "--enable-profile" else "--disable-profile"}"; + + # Workaround for this bug: + # http://sourceware.org/bugzilla/show_bug.cgi?id=411 + # I.e. when gcc is compiled with --with-arch=i686, then the + # preprocessor symbol `__i686' will be defined to `1'. This causes + # the symbol __i686.get_pc_thunk.dx to be mangled. + NIX_CFLAGS_COMPILE = "-U__i686"; } diff --git a/pkgs/development/libraries/glibc/glibc-getcwd-param-MAX.patch b/pkgs/development/libraries/glibc-2.7/glibc-getcwd-param-MAX.patch similarity index 100% rename from pkgs/development/libraries/glibc/glibc-getcwd-param-MAX.patch rename to pkgs/development/libraries/glibc-2.7/glibc-getcwd-param-MAX.patch diff --git a/pkgs/development/libraries/glibc/glibc-pwd.patch b/pkgs/development/libraries/glibc-2.7/glibc-pwd.patch similarity index 100% rename from pkgs/development/libraries/glibc/glibc-pwd.patch rename to pkgs/development/libraries/glibc-2.7/glibc-pwd.patch diff --git a/pkgs/development/libraries/gtk-libs-2.10/default.nix b/pkgs/development/libraries/gtk-libs-2.10/default.nix deleted file mode 100644 index ed5ae35f05d..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.10/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ xineramaSupport ? false -, stdenv, fetchurl, pkgconfig, gettext, perl, x11 -, libtiff, libjpeg, libpng, cairo, libXinerama ? null, libXrandr -}: - -rec { - - glib = (import ./glib) { - inherit fetchurl stdenv pkgconfig gettext perl; - }; - - atk = (import ./atk) { - inherit fetchurl stdenv pkgconfig glib perl; - }; - - pango = (import ./pango) { - inherit fetchurl stdenv pkgconfig glib x11 cairo libpng; - }; - - gtk = (import ./gtk+) { - inherit fetchurl stdenv pkgconfig glib atk pango perl - libtiff libjpeg libpng x11 cairo libXinerama - xineramaSupport libXrandr; - }; - -} diff --git a/pkgs/development/libraries/gtk-libs-2.10/gtk+/default.nix b/pkgs/development/libraries/gtk-libs-2.10/gtk+/default.nix deleted file mode 100644 index 474c6499380..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.10/gtk+/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ xineramaSupport ? false -, stdenv, fetchurl, pkgconfig, x11, glib, atk -, pango, perl, libtiff, libjpeg, libpng, cairo, libXinerama ? null, libXrandr -}: - -assert x11.buildClientLibs; -assert xineramaSupport -> libXinerama != null; - - -stdenv.mkDerivation { - name = "gtk+-2.10.14"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-2.10.14.tar.bz2; - sha256 = "1qjdx9kdc533dajdy1kv3ssxzh7gz7j7vzgw0ax910q4klil88yh"; - }; - buildInputs = [ - pkgconfig perl libtiff libjpeg libpng cairo libXrandr - (if xineramaSupport then libXinerama else null) - ]; - propagatedBuildInputs = [x11 glib atk pango]; - inherit libtiff libjpeg libpng; -} diff --git a/pkgs/development/libraries/gtk-libs-2.2/atk/default.nix b/pkgs/development/libraries/gtk-libs-2.2/atk/default.nix deleted file mode 100644 index 1089f571099..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.2/atk/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, fetchurl, pkgconfig, glib, perl}: - -assert pkgconfig != null && glib != null && perl != null; - -stdenv.mkDerivation { - name = "atk-1.2.4"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.2/atk-1.2.4.tar.bz2; - md5 = "2d6d50df31abe0e8892b5d3e7676a02d"; - }; - buildInputs = [pkgconfig perl]; - propagatedBuildInputs = [glib]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.2/glib/default.nix b/pkgs/development/libraries/gtk-libs-2.2/glib/default.nix deleted file mode 100644 index 22d01d0d86f..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.2/glib/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{stdenv, fetchurl, pkgconfig, gettext, perl}: - -assert pkgconfig != null && gettext != null && perl != null; - -stdenv.mkDerivation { - name = "glib-2.2.3"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.3.tar.bz2; - md5 = "aa214a10d873b68ddd67cd9de2ccae55"; - }; - buildInputs = [pkgconfig gettext perl]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.2/gtk+/default.nix b/pkgs/development/libraries/gtk-libs-2.2/gtk+/default.nix deleted file mode 100644 index e1eef805803..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.2/gtk+/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, x11, glib, atk -, pango, perl, libtiff, libjpeg, libpng}: - -assert pkgconfig != null && x11 != null && glib != null && atk != null - && pango != null && perl != null && perl != null && libtiff != null - && libjpeg != null && libpng != null; -assert x11.buildClientLibs; -#assert glib == atk.glib; -#assert glib == pango.glib; -#assert x11 == pango.x11; - -stdenv.mkDerivation { - name = "gtk+-2.2.4"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.2/gtk+-2.2.4.tar.bz2; - md5 = "605332199533e73bc6eec481fb4f1671"; - }; - buildInputs = [pkgconfig perl libtiff libjpeg libpng]; - propagatedBuildInputs = [x11 glib atk pango]; - inherit libtiff libjpeg libpng; -} diff --git a/pkgs/development/libraries/gtk-libs-2.2/pango/default.nix b/pkgs/development/libraries/gtk-libs-2.2/pango/default.nix deleted file mode 100644 index 5d5e5184dda..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.2/pango/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{stdenv, fetchurl, pkgconfig, x11, glib}: - -assert pkgconfig != null && x11 != null && glib != null; -assert x11.buildClientLibs; - -stdenv.mkDerivation { - name = "pango-1.2.5"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.5.tar.bz2; - md5 = "df00fe3e71cd297010f24f439b6c8ee6"; - }; - buildInputs = [pkgconfig]; - propagatedBuildInputs = [x11 glib]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.4/atk/default.nix b/pkgs/development/libraries/gtk-libs-2.4/atk/default.nix deleted file mode 100644 index 095ff32b2aa..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.4/atk/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, fetchurl, pkgconfig, glib, perl}: - -assert pkgconfig != null && glib != null && perl != null; - -stdenv.mkDerivation { - name = "atk-1.6.1"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.4/atk-1.6.1.tar.bz2; - md5 = "f77be7e128c957bd3056c2e270b5f283"; - }; - buildInputs = [pkgconfig perl]; - propagatedBuildInputs = [glib]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.4/default.nix b/pkgs/development/libraries/gtk-libs-2.4/default.nix deleted file mode 100644 index dc01a534d81..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.4/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, gettext, perl, x11 -, libtiff, libjpeg, libpng}: - -rec { - - glib = (import ./glib) { - inherit fetchurl stdenv pkgconfig gettext perl; - }; - - atk = (import ./atk) { - inherit fetchurl stdenv pkgconfig glib perl; - }; - - pango = (import ./pango) { - inherit fetchurl stdenv pkgconfig glib x11; - }; - - gtk = (import ./gtk+) { - inherit fetchurl stdenv pkgconfig glib atk pango perl - libtiff libjpeg libpng x11; - }; - -} diff --git a/pkgs/development/libraries/gtk-libs-2.4/glib/default.nix b/pkgs/development/libraries/gtk-libs-2.4/glib/default.nix deleted file mode 100644 index 58f91b3f83c..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.4/glib/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{stdenv, fetchurl, pkgconfig, gettext, perl}: - -assert pkgconfig != null && gettext != null && perl != null; - -stdenv.mkDerivation { - name = "glib-2.4.7"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.4/glib-2.4.7.tar.bz2; - md5 = "eff6fec89455addf8b0dee5a19e343be"; - }; - buildInputs = [pkgconfig gettext perl]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.4/gtk+/default.nix b/pkgs/development/libraries/gtk-libs-2.4/gtk+/default.nix deleted file mode 100644 index 56a6e41e731..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.4/gtk+/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, x11, glib, atk -, pango, perl, libtiff, libjpeg, libpng}: - -assert pkgconfig != null && x11 != null && glib != null && atk != null - && pango != null && perl != null && perl != null && libtiff != null - && libjpeg != null && libpng != null; -assert x11.buildClientLibs; -#assert glib == atk.glib; -#assert glib == pango.glib; -#assert x11 == pango.x11; - -stdenv.mkDerivation { - name = "gtk+-2.4.13"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.4/gtk+-2.4.13.tar.bz2; - md5 = "3a438e1010704b11acaf060c9ba0fd7b"; - }; - buildInputs = [pkgconfig perl libtiff libjpeg libpng]; - propagatedBuildInputs = [x11 glib atk pango]; - inherit libtiff libjpeg libpng; -} diff --git a/pkgs/development/libraries/gtk-libs-2.4/pango/default.nix b/pkgs/development/libraries/gtk-libs-2.4/pango/default.nix deleted file mode 100644 index 986891b98b9..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.4/pango/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{stdenv, fetchurl, pkgconfig, x11, glib}: - -assert pkgconfig != null && x11 != null && glib != null; -assert x11.buildClientLibs; - -stdenv.mkDerivation { - name = "pango-1.4.1"; - src = fetchurl { - url = ftp://ftp.gtk.org/pub/gtk/v2.4/pango-1.4.1.tar.bz2; - md5 = "39868e0da250fd4c00b2970e4eb84389"; - }; - buildInputs = [pkgconfig]; - propagatedBuildInputs = [x11 glib]; -} diff --git a/pkgs/development/libraries/gtk-libs-2.6/default.nix b/pkgs/development/libraries/gtk-libs-2.6/default.nix deleted file mode 100644 index dc01a534d81..00000000000 --- a/pkgs/development/libraries/gtk-libs-2.6/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, gettext, perl, x11 -, libtiff, libjpeg, libpng}: - -rec { - - glib = (import ./glib) { - inherit fetchurl stdenv pkgconfig gettext perl; - }; - - atk = (import ./atk) { - inherit fetchurl stdenv pkgconfig glib perl; - }; - - pango = (import ./pango) { - inherit fetchurl stdenv pkgconfig glib x11; - }; - - gtk = (import ./gtk+) { - inherit fetchurl stdenv pkgconfig glib atk pango perl - libtiff libjpeg libpng x11; - }; - -} diff --git a/pkgs/development/libraries/gtk-libs-1.x/default.nix b/pkgs/development/libraries/gtk-libs/1.x/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/default.nix rename to pkgs/development/libraries/gtk-libs/1.x/default.nix diff --git a/pkgs/development/libraries/gtk-libs-1.x/gdk-pixbuf/default.nix b/pkgs/development/libraries/gtk-libs/1.x/gdk-pixbuf/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/gdk-pixbuf/default.nix rename to pkgs/development/libraries/gtk-libs/1.x/gdk-pixbuf/default.nix diff --git a/pkgs/development/libraries/gtk-libs-1.x/glib/default.nix b/pkgs/development/libraries/gtk-libs/1.x/glib/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/glib/default.nix rename to pkgs/development/libraries/gtk-libs/1.x/glib/default.nix diff --git a/pkgs/development/libraries/gtk-libs-1.x/glib/gcc34.patch b/pkgs/development/libraries/gtk-libs/1.x/glib/gcc34.patch similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/glib/gcc34.patch rename to pkgs/development/libraries/gtk-libs/1.x/glib/gcc34.patch diff --git a/pkgs/development/libraries/gtk-libs-1.x/gtk+/builder.sh b/pkgs/development/libraries/gtk-libs/1.x/gtk+/builder.sh similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/gtk+/builder.sh rename to pkgs/development/libraries/gtk-libs/1.x/gtk+/builder.sh diff --git a/pkgs/development/libraries/gtk-libs-1.x/gtk+/default.nix b/pkgs/development/libraries/gtk-libs/1.x/gtk+/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-1.x/gtk+/default.nix rename to pkgs/development/libraries/gtk-libs/1.x/gtk+/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.10/atk/default.nix b/pkgs/development/libraries/gtk-libs/2.10/atk/default.nix similarity index 72% rename from pkgs/development/libraries/gtk-libs-2.10/atk/default.nix rename to pkgs/development/libraries/gtk-libs/2.10/atk/default.nix index 34d23bc6daa..1dae480423f 100644 --- a/pkgs/development/libraries/gtk-libs-2.10/atk/default.nix +++ b/pkgs/development/libraries/gtk-libs/2.10/atk/default.nix @@ -1,6 +1,4 @@ -{stdenv, fetchurl, pkgconfig, glib, perl}: - -assert pkgconfig != null && glib != null && perl != null; +args: with args; stdenv.mkDerivation { name = "atk-1.12.4"; diff --git a/pkgs/development/libraries/gtk-libs/2.10/default.nix b/pkgs/development/libraries/gtk-libs/2.10/default.nix new file mode 100644 index 00000000000..0fc77dde627 --- /dev/null +++ b/pkgs/development/libraries/gtk-libs/2.10/default.nix @@ -0,0 +1,16 @@ +args: with args; + +rec { + + glib = (import ./glib) args; + + atk = (import ./atk) (args // { inherit glib; }); + + pango = (import ./pango) (args // { inherit glib; }); + + gtk = (import ./gtk+) (args // { inherit glib atk pango; } ); + + glibmm = (import ./glibmm) (args // { inherit glib; }); + + gtkmm = (import ./gtkmm) (args // { inherit gtk atk glibmm; }); +} diff --git a/pkgs/development/libraries/gtk-libs-2.10/glib/default.nix b/pkgs/development/libraries/gtk-libs/2.10/glib/default.nix similarity index 72% rename from pkgs/development/libraries/gtk-libs-2.10/glib/default.nix rename to pkgs/development/libraries/gtk-libs/2.10/glib/default.nix index b29f6b62f93..9af2ab959b1 100644 --- a/pkgs/development/libraries/gtk-libs-2.10/glib/default.nix +++ b/pkgs/development/libraries/gtk-libs/2.10/glib/default.nix @@ -1,6 +1,4 @@ -{stdenv, fetchurl, pkgconfig, gettext, perl}: - -assert pkgconfig != null && gettext != null && perl != null; +args: with args; stdenv.mkDerivation { name = "glib-2.12.13"; # <- sic! gtk 2.10 needs glib 2.12 diff --git a/pkgs/development/libraries/gtk-libs-2.10/glibmm/default.nix b/pkgs/development/libraries/gtk-libs/2.10/glibmm/default.nix similarity index 71% rename from pkgs/development/libraries/gtk-libs-2.10/glibmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.10/glibmm/default.nix index e1d275b9974..bbdde49b75d 100644 --- a/pkgs/development/libraries/gtk-libs-2.10/glibmm/default.nix +++ b/pkgs/development/libraries/gtk-libs/2.10/glibmm/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, glib, libsigcxx}: +args: with args; stdenv.mkDerivation { name = "glibmm-2.12.10"; @@ -7,6 +7,7 @@ stdenv.mkDerivation { sha256 = "02rjjdh0f6kafa1sn4y5ykvm4f2qn3yh4kr4lngcv7vzasqn1dr1"; }; - buildInputs = [pkgconfig glib libsigcxx]; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [glib libsigcxx]; } diff --git a/pkgs/development/libraries/gtk-libs/2.10/gtk+/default.nix b/pkgs/development/libraries/gtk-libs/2.10/gtk+/default.nix new file mode 100644 index 00000000000..a819c1fc275 --- /dev/null +++ b/pkgs/development/libraries/gtk-libs/2.10/gtk+/default.nix @@ -0,0 +1,13 @@ +args: with args; + +stdenv.mkDerivation { + name = "gtk+-2.10.14"; + src = fetchurl { + url = ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-2.10.14.tar.bz2; + sha256 = "1qjdx9kdc533dajdy1kv3ssxzh7gz7j7vzgw0ax910q4klil88yh"; + }; + buildInputs = [ pkgconfig perl ]; + propagatedBuildInputs = [x11 glib atk pango libtiff libjpeg libpng cairo + libXrandr (if xineramaSupport then libXinerama else null)]; + passthru = { inherit libtiff libjpeg libpng; }; +} diff --git a/pkgs/development/libraries/gtk-libs-2.10/gtkmm/default.nix b/pkgs/development/libraries/gtk-libs/2.10/gtkmm/default.nix similarity index 66% rename from pkgs/development/libraries/gtk-libs-2.10/gtkmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.10/gtkmm/default.nix index 4f476f73d50..9a44e9a6ba2 100644 --- a/pkgs/development/libraries/gtk-libs-2.10/gtkmm/default.nix +++ b/pkgs/development/libraries/gtk-libs/2.10/gtkmm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gtk, atk, glibmm, libsigcxx}: +args: with args; stdenv.mkDerivation { name = "gtkmm-2.10.11"; @@ -7,6 +7,7 @@ stdenv.mkDerivation { sha256 = "1bri9r0k69dmi5xgzrlfllp3adfzhz8dh9zkcvi6sjkgfwi594vx"; }; - buildInputs = [pkgconfig gtk atk glibmm libsigcxx]; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [glibmm gtk atk cairomm]; } diff --git a/pkgs/development/libraries/gtk-libs-2.10/pango/default.nix b/pkgs/development/libraries/gtk-libs/2.10/pango/default.nix similarity index 52% rename from pkgs/development/libraries/gtk-libs-2.10/pango/default.nix rename to pkgs/development/libraries/gtk-libs/2.10/pango/default.nix index 25d4aa17e91..faf5ffb4724 100644 --- a/pkgs/development/libraries/gtk-libs-2.10/pango/default.nix +++ b/pkgs/development/libraries/gtk-libs/2.10/pango/default.nix @@ -1,6 +1,4 @@ -{stdenv, fetchurl, pkgconfig, x11, glib, cairo, libpng}: - -assert x11.buildClientLibs; +args: with args; stdenv.mkDerivation { name = "pango-1.14.10"; @@ -8,6 +6,6 @@ stdenv.mkDerivation { url = ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.10.tar.bz2; md5 = "e9fc2f8168e74e2fa0aa8238ee0e9c06"; }; - buildInputs = [pkgconfig libpng]; - propagatedBuildInputs = [x11 glib cairo]; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [x11 glib cairo libpng]; } diff --git a/pkgs/development/libraries/gtk-libs-2.6/atk/default.nix b/pkgs/development/libraries/gtk-libs/2.6/atk/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/atk/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/atk/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.2/default.nix b/pkgs/development/libraries/gtk-libs/2.6/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.2/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.6/glib/default.nix b/pkgs/development/libraries/gtk-libs/2.6/glib/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/glib/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/glib/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.6/glibmm/default.nix b/pkgs/development/libraries/gtk-libs/2.6/glibmm/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/glibmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/glibmm/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.6/gtk+/default.nix b/pkgs/development/libraries/gtk-libs/2.6/gtk+/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/gtk+/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/gtk+/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.6/gtkmm/default.nix b/pkgs/development/libraries/gtk-libs/2.6/gtkmm/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/gtkmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/gtkmm/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.6/pango/default.nix b/pkgs/development/libraries/gtk-libs/2.6/pango/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.6/pango/default.nix rename to pkgs/development/libraries/gtk-libs/2.6/pango/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/atk/default.nix b/pkgs/development/libraries/gtk-libs/2.8/atk/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/atk/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/atk/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/default.nix b/pkgs/development/libraries/gtk-libs/2.8/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/glib/default.nix b/pkgs/development/libraries/gtk-libs/2.8/glib/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/glib/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/glib/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/glibmm/default.nix b/pkgs/development/libraries/gtk-libs/2.8/glibmm/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/glibmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/glibmm/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/gtk+/default.nix b/pkgs/development/libraries/gtk-libs/2.8/gtk+/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/gtk+/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/gtk+/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/gtkmm/default.nix b/pkgs/development/libraries/gtk-libs/2.8/gtkmm/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/gtkmm/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/gtkmm/default.nix diff --git a/pkgs/development/libraries/gtk-libs-2.8/pango/default.nix b/pkgs/development/libraries/gtk-libs/2.8/pango/default.nix similarity index 100% rename from pkgs/development/libraries/gtk-libs-2.8/pango/default.nix rename to pkgs/development/libraries/gtk-libs/2.8/pango/default.nix diff --git a/pkgs/development/libraries/ilbc/default.nix b/pkgs/development/libraries/ilbc/default.nix new file mode 100644 index 00000000000..360644cf911 --- /dev/null +++ b/pkgs/development/libraries/ilbc/default.nix @@ -0,0 +1,17 @@ +args: with args; +stdenv.mkDerivation { + name = "ilbc-rfc3951"; + +# I'm too lazy to extract .c source from rfc3951. So, I'm using autotools stuff +# from linphone project + src = stdenv.mkDerivation { + name = "ilbc-rfc3951.tar.gz"; + src = msilbc.src; + outputHashAlgo = "sha256"; + outputHash = "0f6scsp72bz2ifscd8c0x57ipcxi2i4a9b4nwlnwx7a7a0hrazhj"; + phases = "unpackPhase installPhase"; + installPhase = "cp ilbc-rfc3951.tar.gz \${out}"; + }; + + configureFlags = "--enable-shared --disable-static"; +} diff --git a/pkgs/development/libraries/libarchive/2.4.11.nix b/pkgs/development/libraries/libarchive/2.4.11.nix new file mode 100644 index 00000000000..e75d59ec18a --- /dev/null +++ b/pkgs/development/libraries/libarchive/2.4.11.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "1iq5hs4hbqyl6sqiqlaj3j89vpfqx6zv974c965nxjvmwy816dbz" args diff --git a/pkgs/development/libraries/libarchive/2.4.12.nix b/pkgs/development/libraries/libarchive/2.4.12.nix new file mode 100644 index 00000000000..9765ec61cd7 --- /dev/null +++ b/pkgs/development/libraries/libarchive/2.4.12.nix @@ -0,0 +1,2 @@ +args: +import ./common.nix "133kxx1wfangrhy6rcpqlqib7i45qxj8pcp3i9n574cwfx41swy4" args diff --git a/pkgs/development/libraries/libarchive/common.nix b/pkgs/development/libraries/libarchive/common.nix new file mode 100644 index 00000000000..9f031e4f2c2 --- /dev/null +++ b/pkgs/development/libraries/libarchive/common.nix @@ -0,0 +1,18 @@ +sha256: args: with args; +stdenv.mkDerivation rec { + name = "libarchive-" + version; + + src = fetchurl { + url = "${meta.homepage}/src/${name}.tar.gz"; + inherit sha256; + }; + + propagatedBuildInputs = [zlib bzip2 e2fsprogs]; + buildInputs = [sharutils]; + configureFlags = "--enable-shared --disable-static"; + + meta = { + description = "A library for reading and writing streaming archives"; + homepage = http://people.freebsd.org/~kientzle/libarchive; + }; +} diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix deleted file mode 100644 index c7dc2b39389..00000000000 --- a/pkgs/development/libraries/libarchive/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -args: with args; -stdenv.mkDerivation rec { - name = "libarchive-2.4.11"; - - src = fetchurl { - url = "http://FIXME_dont_remember/${name}.tar.gz"; - sha256 = "1iq5hs4hbqyl6sqiqlaj3j89vpfqx6zv974c965nxjvmwy816dbz"; - }; - - buildInputs = [zlib]; - - meta = { - description = "A library for reading and writing streaming archives"; - }; -} diff --git a/pkgs/development/libraries/libavc1394/default.nix b/pkgs/development/libraries/libavc1394/default.nix index 0834c212fe9..672ca202354 100644 --- a/pkgs/development/libraries/libavc1394/default.nix +++ b/pkgs/development/libraries/libavc1394/default.nix @@ -7,7 +7,8 @@ stdenv.mkDerivation { sha256 = "19i40i3722ilhziknfds3a6w5xzv66fvc68gvbir1p2fvwi6ij93"; }; - buildInputs = [pkgconfig libraw1394]; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [libraw1394]; meta = { description = "programming interface for the 1394 Trade Association AV/C (Audio/Video Control) Digital Interface Command Set"; diff --git a/pkgs/development/libraries/libiec61883/default.nix b/pkgs/development/libraries/libiec61883/default.nix index c4062403d38..6fe199f5b91 100644 --- a/pkgs/development/libraries/libiec61883/default.nix +++ b/pkgs/development/libraries/libiec61883/default.nix @@ -1,17 +1,18 @@ args: with args; -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "libiec61883-1.1.0"; src = fetchurl { - url = http://www.linux1394.org/dl/libiec61883-1.1.0.tar.gz; + url = "${meta.homepage}/dl/${name}.tar.gz"; sha256 = "09f0ca7bp6lqlz6601gnyl04mfabv0azg49n1cmjyqpzh35cgxkq"; }; - buildInputs = [pkgconfig libraw1394]; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [libraw1394]; meta = { description = "TODO"; - homepage = http://www.linux1394.org/; + homepage = http://www.linux1394.org; license = "LGPL"; }; } diff --git a/pkgs/development/libraries/libjingle/0.3.11.nix b/pkgs/development/libraries/libjingle/0.3.11.nix new file mode 100644 index 00000000000..b9d0b82df5e --- /dev/null +++ b/pkgs/development/libraries/libjingle/0.3.11.nix @@ -0,0 +1,10 @@ +args: with args; +stdenv.mkDerivation rec { + name = "libjingle-" + version; + src = fetchurl { + url = "mirror://sf/tapioca-voip/${name}.tar.gz"; + sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj"; + }; + + propagatedBuildInputs = [ mediastreamer ]; +} diff --git a/pkgs/development/libraries/libjingle/0.4.0.nix b/pkgs/development/libraries/libjingle/0.4.0.nix new file mode 100644 index 00000000000..93bacd00929 --- /dev/null +++ b/pkgs/development/libraries/libjingle/0.4.0.nix @@ -0,0 +1,10 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "libjingle-" + version; + + src = fetchurl { + url = "mirror://sf/libjingle/${name}.tar.gz"; + sha256 = "0izg1i4nmhysvkqmsl2xqp0x6lwz2jjyavvhv196hsdsr2w0iwvi"; + }; +} diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix index 42747db95a1..8b58fe857e9 100644 --- a/pkgs/development/libraries/libnotify/default.nix +++ b/pkgs/development/libraries/libnotify/default.nix @@ -1,7 +1,4 @@ -{ stdenv, fetchurl -, pkgconfig, dbus, dbus_glib -, gtk, glib -}: +args: with args; stdenv.mkDerivation { name = "libnotify-0.4.4"; @@ -13,7 +10,7 @@ stdenv.mkDerivation { }; buildInputs = [ - pkgconfig dbus dbus_glib gtk glib + pkgconfig dbus.libs dbus_glib gtk glib ]; configureFlags=""; diff --git a/pkgs/development/libraries/libraw1394/default.nix b/pkgs/development/libraries/libraw1394/default.nix index 8463749fcb3..2ca8c543fa9 100644 --- a/pkgs/development/libraries/libraw1394/default.nix +++ b/pkgs/development/libraries/libraw1394/default.nix @@ -1,15 +1,15 @@ args: with args; -stdenv.mkDerivation { - name = "libraw1394-1.2.0"; +stdenv.mkDerivation rec { + name = "libraw1394-1.3.0"; src = fetchurl { - url = "mirror://sourceforge/libraw1394/libraw1394-1.2.0.tar.gz"; - sha256 = "1b9zqqzyz0ihyfvhn135y3wc6vmym5yz21jxj9dp0f09b96gmp0z"; + url = "${meta.homepage}/dl/${name}.tar.gz"; + sha256 = "035mrca9fhg4kq8r1s5yjgzg3vrn1nc3ndy13yg3chhqgx4dzzr0"; }; meta = { description = "library providing direct access to the IEEE 1394 bus through the Linux 1394 subsystem's raw1394 user space interface"; - homepage = "http://wiki.linux1394.org/"; + homepage = "http://www.linux1394.org"; license = ["GPL" "LGPL"]; }; } diff --git a/pkgs/development/libraries/libsigsegv/2.5.nix b/pkgs/development/libraries/libsigsegv/2.5.nix new file mode 100644 index 00000000000..11f69753dc8 --- /dev/null +++ b/pkgs/development/libraries/libsigsegv/2.5.nix @@ -0,0 +1,14 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "libsigsegv-" + version; + src = fetchurl { + url = "mirror://gnu/libsigsegv/${name}.tar.gz"; + sha256 = "0fvcsq9msi63vrbpvks6mqkrnls5cfy6bzww063sqhk2h49vsyyg"; + }; + + meta = { + homepage = http://libsigsegv.sf.net; + description = "A library for handling page faults in user mode"; + }; +} diff --git a/pkgs/development/libraries/libsigsegv/default.nix b/pkgs/development/libraries/libsigsegv/default.nix deleted file mode 100644 index 07d4bdaacc8..00000000000 --- a/pkgs/development/libraries/libsigsegv/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{stdenv, fetchurl}: - -stdenv.mkDerivation { - name = "libsigsegv-2.1"; - src = fetchurl { - url = mirror://gnu/libsigsegv/libsigsegv-2.1.tar.gz; - md5 = "6d75ca3fede5fbfd72a78bc918d9e174"; - }; -} diff --git a/pkgs/development/libraries/libxklavier/3.4.nix b/pkgs/development/libraries/libxklavier/3.4.nix new file mode 100644 index 00000000000..38fa91cfeb0 --- /dev/null +++ b/pkgs/development/libraries/libxklavier/3.4.nix @@ -0,0 +1,21 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "libxklavier-" + version; + + src = fetchurl { + url = "mirror://sf/gswitchit/${name}.tar.gz"; + sha256 = "07pq74ygmnr3vgfp86dbjnqsp3v67fww6d3a1vqbif9wzbk70195"; + }; + +# TODO: enable xmodmap support, needs xmodmap DB + propagatedBuildInputs = [libX11 xkeyboard_config libxml2 libICE glib libxkbfile]; + buildInputs = [pkgconfig]; + configureFlags = "--enable-shared --disable-static + --with-xkb-base=${xkeyboard_config}/etc/X11/xkb + --disable-xmodmap-support"; + + meta = { + homepage = http://freedesktop.org/wiki/Software/LibXklavier; + }; +} diff --git a/pkgs/development/libraries/log4cxx/default.nix b/pkgs/development/libraries/log4cxx/default.nix index 49544796612..63f32c05bc7 100644 --- a/pkgs/development/libraries/log4cxx/default.nix +++ b/pkgs/development/libraries/log4cxx/default.nix @@ -6,6 +6,6 @@ stdenv.mkDerivation { url = http://archive.apache.org/dist/logging/log4cxx/log4cxx-0.9.7.tar.gz; sha256 = "1ikyxd8jgf7b2cqjk5lidl7cffs114iiblaczaqbv5bm4vyb4hav"; }; - buildInputs = [ autoconf automake libtool libxml2 cppunit ]; + buildInputs = [ autoconf automake libtool libxml2 cppunit boost ]; patchPhase = "sh autogen.sh; sed -e 's/DOMConfigurator::subst/subst/' -i include/log4cxx/xml/domconfigurator.h"; } diff --git a/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix b/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix new file mode 100644 index 00000000000..6391ce4dd6c --- /dev/null +++ b/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix @@ -0,0 +1,22 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "mediastreamer2-" + version; + +# This url is not related to mediastreamer. fetchcvs doesn't work on my laptop, +# so I've created cvs snapshot and put it to my server. + src = fetchurl { + url = "http://www.loegria.net/misc/" + name + ".tar.bz2"; + sha256 = "1nmvyqh4x3nsw4qbj754jwagj9ia183kvp8valdr7m44my0sw5p1"; + }; + + buildInputs = [automake libtool autoconf pkgconfig]; + + propagatedBuildInputs = [alsaLib ffmpeg speex ortp]; + + preConfigure = "./autogen.sh"; + + patches = [ ./h264.patch ./plugins.patch ]; + + configureFlags = "--enable-external-ortp --enable-shared --disable-static"; +} diff --git a/pkgs/development/libraries/mediastreamer/h264.patch b/pkgs/development/libraries/mediastreamer/h264.patch new file mode 100644 index 00000000000..0c6dc9e9109 --- /dev/null +++ b/pkgs/development/libraries/mediastreamer/h264.patch @@ -0,0 +1,12 @@ +diff --git a/tests/mediastream.c b/tests/mediastream.c +index 12e1605..cdc8cd1 100644 +--- a/tests/mediastream.c ++++ b/tests/mediastream.c +@@ -144,7 +144,6 @@ int main(int argc, char * argv[]) + rtp_profile_set_payload(&av_profile,97,&payload_type_theora); + rtp_profile_set_payload(&av_profile,99,&payload_type_mp4v); + rtp_profile_set_payload(&av_profile,100,&payload_type_x_snow); +- rtp_profile_set_payload(&av_profile,102,&payload_type_h264); + #endif + if (argc<4) { + printf(usage); diff --git a/pkgs/development/libraries/mediastreamer/plugins.patch b/pkgs/development/libraries/mediastreamer/plugins.patch new file mode 100644 index 00000000000..e82b85035f0 --- /dev/null +++ b/pkgs/development/libraries/mediastreamer/plugins.patch @@ -0,0 +1,49 @@ +diff --git a/src/mscommon.c b/src/mscommon.c +index 1a12b2f..2399444 100644 +--- a/src/mscommon.c ++++ b/src/mscommon.c +@@ -428,6 +428,7 @@ static MSSndCardDesc * ms_snd_card_descs[]={ + void ms_init(){ + int i; + MSSndCardManager *cm; ++ char *ms_plugin_path; + + #ifdef __APPLE__ + NSApplicationLoad(); +@@ -451,7 +452,35 @@ void ms_init(){ + } + + ms_message("Loading plugins"); +- ms_load_plugins(PACKAGE_PLUGINS_DIR); ++ ms_plugin_path = getenv("MS_PLUGIN_PATH"); ++ do ++ { ++ if (!ms_plugin_path) ++ { ++ ms_load_plugins(PACKAGE_PLUGINS_DIR); ++ break; ++ } ++ char *dup_plugins_path = strdup (ms_plugin_path); ++ char *cur_plugins_dir = dup_plugins_path; ++ if (!dup_plugins_path) ++ { ++ ms_message("Failed to duplicate plugins path, not loading plugins"); ++ break; ++ } ++ while (1) ++ { ++ char *next_delimiter = strchr(cur_plugins_dir, ":"); ++ if (next_delimiter) ++ next_delimiter[0] = '\0'; ++ ms_load_plugins(cur_plugins_dir); ++ if (!next_delimiter) ++ break; ++ cur_plugins_dir = next_delimiter + 1; ++ } ++ free(dup_plugins_path); ++ } ++ while (0); ++ + ms_message("ms_init() done"); + } + diff --git a/pkgs/development/libraries/msilbc/2.0.0.nix b/pkgs/development/libraries/msilbc/2.0.0.nix new file mode 100644 index 00000000000..8bc8f2a6c1d --- /dev/null +++ b/pkgs/development/libraries/msilbc/2.0.0.nix @@ -0,0 +1,24 @@ +args: with args; +stdenv.mkDerivation rec { + name = "msilbc-" + version; + src = fetchurl { + url = "http://download.savannah.gnu.org/releases/linphone/plugins/sources/${name}.tar.gz"; + sha256 = "0ifydb7qmpync56l4hbrp36n5wrb7gadb76isp643s6wsg7l743j"; + }; + + patchPhase = "sed -i /MS_FILTER_SET_FMTP/d ilbc.c"; + + propagatedBuildInputs = [ilbc mediastreamer]; + buildInputs = [pkgconfig]; + + buildPhase = '' + cc -fPIC -c -pthread -o ilbc.o ilbc.c `pkg-config --cflags mediastreamer` + echo "next" + cc `pkg-config --libs mediastreamer` -shared -pthread -o libilbc.so + ''; + + installPhase = " + ensureDir \${out}/lib/mediastreamer/plugins + cp libilbc.so \${out}/lib/mediastreamer/plugins + "; +} diff --git a/pkgs/development/libraries/ortp/default.nix b/pkgs/development/libraries/ortp/0.13.1.nix similarity index 60% rename from pkgs/development/libraries/ortp/default.nix rename to pkgs/development/libraries/ortp/0.13.1.nix index 4fc51a3ce85..ea1cd64b3d2 100644 --- a/pkgs/development/libraries/ortp/default.nix +++ b/pkgs/development/libraries/ortp/0.13.1.nix @@ -1,11 +1,9 @@ - args: with args; stdenv.mkDerivation rec { - name = "ortp-0.13.1"; + name = "ortp-" + version; src = fetchurl { - url = - "http://download.savannah.nongnu.org/releases/linphone/ortp/sources/${name}.tar.gz"; + url = "mirror://savannah/linphone/ortp/sources/${name}.tar.gz"; sha256 = "0k2963v4b15xnf4cpkpgjhsb8ckxpf6vdr8dnw7z3mzilji7391b"; }; @@ -13,6 +11,6 @@ stdenv.mkDerivation rec { meta = { description = "a Real-Time Transport Protocol (RFC3550) stack under LGPL"; - homepage = http://www.linphone.org/index.php/eng/code_review/ortp; + homepage = http://www.linphone.org/index.php/eng/code_review/ortp; }; } diff --git a/pkgs/development/libraries/ortp/0.7.1.nix b/pkgs/development/libraries/ortp/0.7.1.nix new file mode 100644 index 00000000000..7bedf39f8be --- /dev/null +++ b/pkgs/development/libraries/ortp/0.7.1.nix @@ -0,0 +1,16 @@ +args: with args; +stdenv.mkDerivation rec { + name = "ortp-" + version; + + src = fetchurl { + url = "mirror://savannah/linphone/ortp/sources/${name}.tar.gz"; + sha256 = "0gyl0yzfg78sjhbwnwc2g8yn4riwd1wcv183qihgan6z2d5cfbrg"; + }; + + configureFlags = "--enable-shared --disable-static"; + + meta = { + description = "a Real-Time Transport Protocol (RFC3550) stack under LGPL"; + homepage = http://www.linphone.org/index.php/eng/code_review/ortp; + }; +} diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 1b4d7fc9093..cba26fae76c 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,14 +1,14 @@ -args: with args; +{stdenv, fetchurl, unicodeSupport ? false, cplusplusSupport ? true}: -stdenv.mkDerivation ({ - name = "pcre-7.1"; +stdenv.mkDerivation { + name = "pcre-7.4"; src = fetchurl { - url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.1.tar.bz2; - sha256 = "0rpkcw07jas3fw6ava3ni5zcrmbncwa8xlsa0lzq6z2iph5510li"; + url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.bz2; + sha256 = "1rdks2h5f3p2d71c4jnxaic1c9gmgsfky80djnafcdbdrhzkiyx5"; }; + configureFlags = + (if unicodeSupport then + "--enable-unicode-properties --enable-shared --disable-static" + else "") + + (if !cplusplusSupport then "--disable-cpp" else ""); } -// (if unicodeSupport then -{ - configureFlags = "--enable-unicode-properties --enable-shared --disable-static"; -} -else {})) diff --git a/pkgs/development/libraries/qt-4/builder.sh b/pkgs/development/libraries/qt-4/builder.sh deleted file mode 100755 index 5cd4164a7c2..00000000000 --- a/pkgs/development/libraries/qt-4/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -ensureDir $out/nix-support -substitute "$hook" "$out/nix-support/setup-hook" --subst-var out - -# !!! TODO: -system-libmng -configureFlags="-prefix $out $configureFlags" - -genericBuild diff --git a/pkgs/development/libraries/qt-4/default.nix b/pkgs/development/libraries/qt-4/default.nix index 20893e8d8d9..046ebde99a1 100644 --- a/pkgs/development/libraries/qt-4/default.nix +++ b/pkgs/development/libraries/qt-4/default.nix @@ -4,11 +4,11 @@ rec { setupHook = ./setup-hook.sh; propagatedBuildInputs = [libXft libXrender libXrandr randrproto xextproto libXinerama xineramaproto libXcursor zlib libjpeg mysql libpng which mesa - libXmu openssl dbus cups pkgconfig libXext freetype fontconfig inputproto + libXmu openssl dbus.libs cups pkgconfig libXext freetype fontconfig inputproto fixesproto libXfixes glib libtiff]; prefixKey = "-prefix "; configureFlags = " - -v -no-separate-debug-info -release -nomake examples -nomake demos + -v -no-separate-debug-info -release -system-zlib -system-libpng -system-libjpeg -fast -qt-gif -confirm-license -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql @@ -18,10 +18,10 @@ rec { }; in rec { trolltech = stdenv.mkDerivation (common // { - name = "qt-4.3.1"; + name = "qt-4.3.3"; src = fetchurl { - url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.1.tar.gz; - sha256 = "0qg6apy2r7jbbfinxh0v1jm08yv890r40hhmy5cysn239v3x0nad"; + url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.3.tar.gz; + sha256 = "0w0mfm0wwmbj1vnjn27rza1r9wj8k47mn9ril8swprffqnn4p4w9"; }; patchPhase = common.patchPhase; }); @@ -29,8 +29,8 @@ rec { name = "qt-kde-4.3svn"; src = fetchsvn { url = svn://anonsvn.kde.org/home/kde/trunk/qt-copy; - rev = "732646"; - md5 = "9757de3dce16b483f2f358d287c848ee"; + rev = "761061"; + sha256 = "0i98kh435dj29ln1lnidxwivcha1m553s4l8c1h2b3yd4950w8x4"; }; patchPhase = "mkdir .svn; bash apply_patches;" + common.patchPhase; }); diff --git a/pkgs/development/libraries/readline/readline5.nix b/pkgs/development/libraries/readline/readline5.nix index a0e7ffd72d2..96ec1ffea79 100644 --- a/pkgs/development/libraries/readline/readline5.nix +++ b/pkgs/development/libraries/readline/readline5.nix @@ -1,11 +1,12 @@ -{ stdenv, fetchurl, ncurses }: +args: with args; stdenv.mkDerivation { name = "readline-5.2"; src = fetchurl { url = mirror://gnu/readline/readline-5.2.tar.gz; - md5 = "e39331f32ad14009b9ff49cc10c5e751"; + sha256 = "0icz4hqqq8mlkwrpczyaha94kns0am9z0mh3a2913kg2msb8vs0j"; }; propagatedBuildInputs = [ncurses]; + configureFlags = "--enable-shared --disable-static"; patches = stdenv.lib.optional stdenv.isDarwin ./shobj-darwin.patch; } diff --git a/pkgs/development/libraries/redland/default.nix b/pkgs/development/libraries/redland/default.nix index 37d899feb70..d344fbc0ac3 100644 --- a/pkgs/development/libraries/redland/default.nix +++ b/pkgs/development/libraries/redland/default.nix @@ -4,10 +4,12 @@ stdenv.mkDerivation rec { name = "redland-1.0.7"; src = fetchurl { - url = "sf://librdf/${name}.tar.gz"; + url = "mirror://sf/librdf/${name}.tar.gz"; sha256 = "1z160hhrnlyy5c8vh2hjza6kdfmzml8mg9dk8yffifkhnxjq5r2z"; }; - buildInputs = [ bdb openssl libxml2 pkgconfig perl]; - configureFlags="--without-static --with-threads --with-bdb=${bdb}"; + buildInputs = [pkgconfig]; + propagatedBuildInputs = [ bdb openssl libxslt perl mysql postgresql sqlite + curl pcre]; + configureFlags = "--disable-static --with-threads --with-bdb=${bdb}"; patchPhase="sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl"; } diff --git a/pkgs/development/libraries/tapioca-qt/default.nix b/pkgs/development/libraries/tapioca-qt/default.nix index 956d4c09873..962a82a8a1a 100644 --- a/pkgs/development/libraries/tapioca-qt/default.nix +++ b/pkgs/development/libraries/tapioca-qt/default.nix @@ -1,5 +1,5 @@ args: with args; -let rev = "2031"; in +let rev = "2066"; in stdenv.mkDerivation { name = "tapioca-qt-r${rev}"; src = fetchsvn { diff --git a/pkgs/development/libraries/telepathy-qt/default.nix b/pkgs/development/libraries/telepathy-qt/default.nix index 9c0ea152f4e..6e8e84399d1 100644 --- a/pkgs/development/libraries/telepathy-qt/default.nix +++ b/pkgs/development/libraries/telepathy-qt/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [cmake]; - propagatedBuildInputs = [qt]; + propagatedBuildInputs = [qt stdenv.gcc.libc]; meta = { description = "Qt bindings for telepathy"; }; diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index f65b09f88d4..2ec77d8223e 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -1,48 +1,49 @@ addCMakeParamsInclude() { - if [ -d $1/include ]; then - export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH}${CMAKE_INCLUDE_PATH:+:}$1/include" - fi + addToSearchPath CMAKE_INCLUDE_PATH /include "" $1 } addCMakeParamsLibs() { - if [ -d $1/lib ]; then - export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}${CMAKE_LIBRARY_PATH:+:}$1/lib" - fi + addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1 +} + +addCMakeModulePath() +{ + addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1 } fixCmakeFiles() { - local replaceArgs; - echo "Fixing cmake files" - replaceArgs="-e -f -L -T /usr /FOO" - replaceArgs="${replaceArgs} -a NO_DEFAULT_PATH \"\" -a NO_SYSTEM_PATH \"\"" - find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs} + local replaceArgs; + echo "Fixing cmake files" + replaceArgs="-e -f -L -T /usr /FOO" + replaceArgs="${replaceArgs} -a NO_DEFAULT_PATH \"\" -a NO_SYSTEM_PATH \"\"" + find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs} } cmakePostUnpack() { - sourceRoot=$sourceRoot/build - mkdir -v $sourceRoot - echo source root reset to $sourceRoot + sourceRoot=$sourceRoot/build + mkdir -v $sourceRoot + echo source root reset to $sourceRoot - if [ -z "$dontFixCmake" ]; then - fixCmakeFiles . - fi + if [ -z "$dontFixCmake" ]; then + fixCmakeFiles . + fi - if [ -z "$configureScript" ]; then - configureScript="cmake .." - fi - if [ -z "$dontAddPrefix" ]; then - dontAddPrefix=1 - configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags" - fi + if [ -z "$configureScript" ]; then + configureScript="cmake .." + fi + if [ -z "$dontAddPrefix" ]; then + dontAddPrefix=1 + configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags" + fi } if [ -z "$noCmakeTewaks" ]; then - postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}" + postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}" fi; -envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs) +envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs addCMakeModulePath) diff --git a/pkgs/development/tools/build-managers/gnumake/log.patch b/pkgs/development/tools/build-managers/gnumake/log.patch index 99111ca3495..3104e1f2bde 100644 --- a/pkgs/development/tools/build-managers/gnumake/log.patch +++ b/pkgs/development/tools/build-managers/gnumake/log.patch @@ -1,6 +1,6 @@ -diff -rc make-orig/job.c make-3.81/job.c -*** make-orig/job.c 2006-03-20 04:03:04.000000000 +0100 ---- make-3.81/job.c 2006-06-21 17:31:52.000000000 +0200 +diff -rc make-3.81-orig/job.c make-3.81/job.c +*** make-3.81-orig/job.c 2006-03-20 04:03:04.000000000 +0100 +--- make-3.81/job.c 2008-02-20 17:41:25.000000000 +0100 *************** *** 1083,1089 **** appear. */ @@ -18,9 +18,9 @@ diff -rc make-orig/job.c make-3.81/job.c /* Tell update_goal_chain that a command has been started on behalf of this target. It is important that this happens here and not in -diff -rc make-orig/main.c make-3.81/main.c -*** make-orig/main.c 2006-03-20 03:36:37.000000000 +0100 ---- make-3.81/main.c 2006-06-21 17:48:43.000000000 +0200 +diff -rc make-3.81-orig/main.c make-3.81/main.c +*** make-3.81-orig/main.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/main.c 2008-02-20 17:41:25.000000000 +0100 *************** *** 886,891 **** --- 886,900 ---- @@ -83,9 +83,9 @@ diff -rc make-orig/main.c make-3.81/main.c + + int logNestingStdout = 0; + int logNestingStderr = 0; -diff -rc make-orig/make.h make-3.81/make.h -*** make-orig/make.h 2006-02-16 00:54:43.000000000 +0100 ---- make-3.81/make.h 2006-06-21 17:39:35.000000000 +0200 +diff -rc make-3.81-orig/make.h make-3.81/make.h +*** make-3.81-orig/make.h 2006-02-16 00:54:43.000000000 +0100 +--- make-3.81/make.h 2008-02-20 17:41:25.000000000 +0100 *************** *** 609,611 **** --- 609,613 ---- @@ -94,15 +94,16 @@ diff -rc make-orig/make.h make-3.81/make.h + extern int logNestingStdout; + extern int logNestingStderr; -diff -rc make-orig/remake.c make-3.81/remake.c -*** make-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 ---- make-3.81/remake.c 2006-06-21 17:31:52.000000000 +0200 +diff -rc make-3.81-orig/remake.c make-3.81/remake.c +*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/remake.c 2008-02-20 17:44:01.000000000 +0100 *************** *** 1120,1126 **** ---- 1120,1130 ---- +--- 1120,1131 ---- /* The normal case: start some commands. */ if (!touch_flag || file->cmds->any_recurse) { ++ log_working_directory (1); + fprintf(stderr, "\e[pbuilding %s\n", file->name); + logNestingStderr++; execute_file_commands (file); diff --git a/pkgs/development/tools/misc/automake/setup-hook.sh b/pkgs/development/tools/misc/automake/setup-hook.sh index 097b7b6cbe5..2b12ae3aee0 100644 --- a/pkgs/development/tools/misc/automake/setup-hook.sh +++ b/pkgs/development/tools/misc/automake/setup-hook.sh @@ -1,7 +1,5 @@ addAclocals () { - if test -d $1/share/aclocal; then - export ACLOCAL_PATH="$ACLOCAL_PATH${ACLOCAL_PATH:+:}$1/share/aclocal" - fi + addToSearchPathWithCustomDelimiter : ACLOCAL_PATH /share/aclocal "" $1 } envHooks=(${envHooks[@]} addAclocals) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 9817abd612b..52112c17b6c 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, noSysDirs}: stdenv.mkDerivation { - name = "binutils-2.17"; + name = "binutils-2.18"; builder = ./builder.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/binutils-2.17.tar.bz2; - md5 = "e26e2e06b6e4bf3acf1dc8688a94c0d1"; + url = mirror://gnu/binutils/binutils-2.18.tar.bz2; + sha256 = "16zfc7llbjdn69bbdy7kqgg2xa67ypgj7z5qicgwzvghaaj36yj8"; }; inherit noSysDirs; configureFlags = "--disable-werror"; # needed for dietlibc build diff --git a/pkgs/development/tools/misc/elfutils/0.127.nix b/pkgs/development/tools/misc/elfutils/0.127.nix index 2337ebbdbd0..efa91fa637c 100644 --- a/pkgs/development/tools/misc/elfutils/0.127.nix +++ b/pkgs/development/tools/misc/elfutils/0.127.nix @@ -6,4 +6,5 @@ stdenv.mkDerivation { url = http://nix.cs.uu.nl/dist/tarballs/elfutils-0.127.tar.gz; sha256 = "12n3h5r3c24a6l2wxz0w2dqq072bvgms0dzckivrwp5vdn22lpdv"; }; + preBuild = "sed -e 's/-Werror//' -i */Makefile "; } diff --git a/pkgs/development/tools/misc/ltrace/default.nix b/pkgs/development/tools/misc/ltrace/0.5-3deb.nix similarity index 54% rename from pkgs/development/tools/misc/ltrace/default.nix rename to pkgs/development/tools/misc/ltrace/0.5-3deb.nix index cd77984ded6..bff3e6a8fbc 100644 --- a/pkgs/development/tools/misc/ltrace/default.nix +++ b/pkgs/development/tools/misc/ltrace/0.5-3deb.nix @@ -1,5 +1,10 @@ -args : with args; - let localDefs = builderDefs { +args : with args; let + patch = fetchurl { + url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5-3.diff.gz; + sha256 = "0rin25si7117wld5bc7vf3d73c5k9ph3zach7cbg9h9vvz376c26"; + }; + localDefs = with (builderDefs {src="";} null); + builderDefs { src = /* put a fetchurl here */ fetchurl { url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz; @@ -11,6 +16,10 @@ args : with args; goSrcDir = " cd ltrace-*; "; + preBuild = FullDepEntry ('' + gunzip < ${patch} | patch -Np1 + sed -e s@-Werror@@ -i Makefile.in + '')["minInit" "doUnpack"]; } null; /* null is a terminator for sumArgs */ in with localDefs; let @@ -21,7 +30,7 @@ in stdenv.mkDerivation rec { name = "ltrace-0.5"; builder = writeScript (name + "-builder") - (textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare]); + (textClosure localDefs [preBuild preConfigure doConfigure doMakeInstall doForceShare]); meta = { description = " Library call tracer. diff --git a/pkgs/development/tools/misc/pkgconfig/builder.sh b/pkgs/development/tools/misc/pkgconfig/builder.sh deleted file mode 100644 index 6d281da71e4..00000000000 --- a/pkgs/development/tools/misc/pkgconfig/builder.sh +++ /dev/null @@ -1,10 +0,0 @@ -source $stdenv/setup - -postInstall() { - test -x $out/nix-support || mkdir $out/nix-support - cp $setupHook $out/nix-support/setup-hook -} -postInstall=postInstall - -genericBuild - diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index be8c4febe03..41a61f600e0 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -1,12 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "pkgconfig-0.21"; - builder = ./builder.sh; + name = "pkgconfig-0.22"; setupHook = ./setup-hook.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/pkg-config-0.21.tar.gz; - md5 = "476f45fab1504aac6697aa7785f0ab91"; + url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz; + sha256 = "1rpb5wygmp0f8nal7y3ga4556i7hkjdslv3wdq04fj30gns621vy"; }; patches = [ @@ -19,3 +18,4 @@ stdenv.mkDerivation { }) ]; } + diff --git a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh index f9e7805ccbf..c137fb0e96c 100644 --- a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh +++ b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh @@ -1,7 +1,5 @@ addPkgConfigPath () { - if test -d $1/lib/pkgconfig; then - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH:+:}$1/lib/pkgconfig" - fi + addToSearchPath PKG_CONFIG_PATH /lib/pkgconfig "" $1 } envHooks=(${envHooks[@]} addPkgConfigPath) diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 115e7acf679..3ac24d5cfb3 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -188,10 +188,10 @@ rec { # (e.g. `++ optional (system == "i686-linux") flashplayer'). optional = cond: elem: if cond then [elem] else []; - + # Return a list or an empty list, dependening on a boolean value. optionals = cond: elems: if cond then elems else []; - + # Return a list of integers from `first' up to and including `last'. range = first: last: diff --git a/pkgs/os-specific/linux/dietlibc/default.nix b/pkgs/os-specific/linux/dietlibc/default.nix index 9a501188d53..b795cb60da6 100644 --- a/pkgs/os-specific/linux/dietlibc/default.nix +++ b/pkgs/os-specific/linux/dietlibc/default.nix @@ -34,4 +34,10 @@ stdenv.mkDerivation { #./x86_64-stat64.patch ]; + + meta = { + homepage = http://www.fefe.de/dietlibc/; + description = "A small implementation of the C library"; + license = "GPL"; + }; } diff --git a/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix b/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix index 658bdbf55fa..091f0c910f6 100644 --- a/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix +++ b/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix @@ -13,13 +13,14 @@ args : with args; in with localDefs; let preBuild = FullDepEntry (" + sed -e '1i#define INT_MAX __INT_MAX__' -i *.c *.cpp sed -e 's@/usr/local@'\$out'@g' -i Makefile.m4 Makefile ") [minInit doUnpack]; in stdenv.mkDerivation rec { name = "dvd+rw-tools-"+version; builder = writeScript (name + "-builder") - (textClosure localDefs [preBuild doMakeInstall doForceShare doPropagate]); + (textClosure localDefs [preBuild addInputs (doDump "0") doMakeInstall doForceShare doPropagate]); meta = { description = " DVD+RW tools. diff --git a/pkgs/os-specific/linux/hal/default.nix b/pkgs/os-specific/linux/hal/default.nix index 1fc01298105..ce41a29a9fe 100644 --- a/pkgs/os-specific/linux/hal/default.nix +++ b/pkgs/os-specific/linux/hal/default.nix @@ -1,8 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python, pciutils, usbutils, expat -, libusb, dbus, dbus_glib, glib, libvolume_id, perl, perlXMLParser -, gettext, zlib /* required by pciutils */, eject, libsmbios -, udev -}: +args: with args; stdenv.mkDerivation { name = "hal-0.5.9"; @@ -13,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [ - pkgconfig python pciutils expat libusb dbus dbus_glib glib + pkgconfig python pciutils expat libusb dbus.libs dbus_glib glib libvolume_id perl perlXMLParser gettext zlib libsmbios ]; diff --git a/pkgs/os-specific/linux/iputils/builder.sh b/pkgs/os-specific/linux/iputils/builder.sh index d1b05109aee..b5219c3fefc 100644 --- a/pkgs/os-specific/linux/iputils/builder.sh +++ b/pkgs/os-specific/linux/iputils/builder.sh @@ -1,20 +1,11 @@ source $stdenv/setup -tar zxvf $src -cd iputils +makeFlags="KERNEL_INCLUDE=$kernelHeaders/include LIBC_INCLUDE=$glibc/include" -sed -e "s^KERNEL_INCLUDE=.*$^KERNEL_INCLUDE=$kernelHeaders/include^" < Makefile > Makefile.new - -mv Makefile.new Makefile -sed -e "s^LIBC_INCLUDE=.*$^LIBC_INCLUDE=$glibc/include^" < Makefile > Makefile.new -mv Makefile.new Makefile - -#make ping arping tracepath -make - -mkdir -p $out/bin -mkdir -p $out/sbin +preConfigure="sed -e 's@check-kernel @@' -i Makefile" +installPhase=" +mkdir -pv $out/bin $out/sbin install -c arping $out/sbin/ install -c ping $out/bin/ install -c ping6 $out/sbin/ @@ -22,3 +13,6 @@ install -c rdisc $out/sbin/ install -c tracepath $out/sbin/ install -c tracepath6 $out/sbin/ install -c traceroute6 $out/sbin/ +"; + +genericBuild diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix index c57cf68fd5d..354419a4109 100644 --- a/pkgs/os-specific/linux/iputils/default.nix +++ b/pkgs/os-specific/linux/iputils/default.nix @@ -11,5 +11,5 @@ stdenv.mkDerivation { }; inherit kernelHeaders glibc; - #buildInputs = [bison flex openssl]; + patches = [ ./open-max.patch ]; } diff --git a/pkgs/os-specific/linux/iputils/open-max.patch b/pkgs/os-specific/linux/iputils/open-max.patch new file mode 100644 index 00000000000..26bb95bd9d8 --- /dev/null +++ b/pkgs/os-specific/linux/iputils/open-max.patch @@ -0,0 +1,30 @@ +--- iputils-s20070202/rdisc.c.open-max 2007-08-07 11:34:03.000000000 +0200 ++++ iputils-s20070202/rdisc.c 2007-08-07 11:41:30.000000000 +0200 +@@ -240,14 +240,25 @@ + { + int t; + pid_t pid; +- ++ long open_max; ++ + if (trace) + return; + ++ if ((open_max = sysconf(_SC_OPEN_MAX)) == -1) { ++ if (errno == 0) { ++ (void) fprintf(stderr, "OPEN_MAX is not supported\n"); ++ } ++ else { ++ (void) fprintf(stderr, "sysconf() error\n"); ++ } ++ exit(1); ++ } ++ + if ((pid=fork()) != 0) + exit(0); + +- for (t = 0; t < OPEN_MAX; t++) ++ for (t = 0; t < open_max; t++) + if (t != s) + close(t); + diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.23.1.nix b/pkgs/os-specific/linux/kernel-headers/2.6.23.8.nix similarity index 74% rename from pkgs/os-specific/linux/kernel-headers/2.6.23.1.nix rename to pkgs/os-specific/linux/kernel-headers/2.6.23.8.nix index adaa303aa00..b34ec0533be 100644 --- a/pkgs/os-specific/linux/kernel-headers/2.6.23.1.nix +++ b/pkgs/os-specific/linux/kernel-headers/2.6.23.8.nix @@ -3,11 +3,11 @@ assert stdenv.isLinux; stdenv.mkDerivation { - name = "linux-headers-2.6.23.1"; + name = "linux-headers-2.6.23.8"; builder = ./builder.sh; src = fetchurl { - url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2"; - sha256 = "0737g83h7jbrlss8782b17mhc3nfn8qfbh5s71flz8pjxmbbmg1m"; + url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.23.8.tar.bz2"; + sha256 = "1sp2ww2ya0wyyyq0vdxbn6ydllv9gpmzw2yz66llgvgv32cix534"; }; platform = diff --git a/pkgs/os-specific/linux/kernel-headers/builder.sh b/pkgs/os-specific/linux/kernel-headers/builder.sh index b2ebbc69485..05392d5fe24 100644 --- a/pkgs/os-specific/linux/kernel-headers/builder.sh +++ b/pkgs/os-specific/linux/kernel-headers/builder.sh @@ -1,26 +1,9 @@ source $stdenv/setup +patchPhase="sed -i '/scsi/d' include/Kbuild" -buildPhase() { - make include/linux/version.h -} - -buildPhase=buildPhase - - -installPhase() { - mkdir $out - mkdir $out/include - cp -prvd include/linux include/asm-generic $out/include - cp -prvd include/asm-$platform $out/include - ln -s asm-$platform $out/include/asm - for i in $extraIncludeDirs; do - cp -prvd include/asm-$i $out/include - done - echo -n > $out/include/linux/autoconf.h -} - -installPhase=installPhase +buildPhase="make mrproper headers_check"; +installPhase="make INSTALL_HDR_PATH=$out headers_install" genericBuild diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix deleted file mode 100644 index ef94f1b006c..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{stdenv, fetchurl}: - -assert stdenv.isLinux; - -stdenv.mkDerivation { - name = "linux-headers-2.6.20.11"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.20.11.tar.bz2"; - sha256 = "1n0xgqckj64ga3l53l8lk1591lfcn6zcrqg3phz2m0y841ck5qlk"; - }; - - platform = - if stdenv.system == "i686-linux" then "i386" else - if stdenv.system == "x86_64-linux" then "x86_64" else - if stdenv.system == "powerpc-linux" then "powerpc" else - abort "don't know what the kernel include directory is called for this platform"; - - extraIncludeDirs = - if stdenv.system == "powerpc-linux" then ["ppc"] else []; -} diff --git a/pkgs/os-specific/linux/sysklogd/builder.sh b/pkgs/os-specific/linux/sysklogd/builder.sh index 9f2b8d9282c..62df45ea7c9 100644 --- a/pkgs/os-specific/linux/sysklogd/builder.sh +++ b/pkgs/os-specific/linux/sysklogd/builder.sh @@ -3,7 +3,8 @@ source $stdenv/setup prefix=$out export prefix -installFlags="BINDIR=$out/sbin MANDIR=$out/share/man" +installFlags="BINDIR=$out/sbin MANDIR=$out/share/man INSTALL=install" +patchPhase="sed -e 's@-o \${MAN_USER} -g \${MAN_GROUP} -m \${MAN_PERMS} @@' -i Makefile" ensureDir "$out/share/man/man8/" ensureDir "$out/share/man/man5/" diff --git a/pkgs/os-specific/linux/sysklogd/default.nix b/pkgs/os-specific/linux/sysklogd/default.nix index d991d7e653e..2fe27add5bf 100644 --- a/pkgs/os-specific/linux/sysklogd/default.nix +++ b/pkgs/os-specific/linux/sysklogd/default.nix @@ -1,11 +1,10 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "sysklogd-1.4.1"; + name = "sysklogd-1.5"; builder = ./builder.sh; src = fetchurl { - url = http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.4.1.tar.gz; - md5 = "d214aa40beabf7bdb0c9b3c64432c774"; + url = http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.tar.gz; + sha256 = "0wxpkrznqwz4dy11k90s2sqszwp7d4mlc0ag8288wa193plvhsb1"; }; - patches = [./sysklogd-1.4.1-cvs-20050525-local.diff ./sysklogd-1.4.1-asm.patch]; } diff --git a/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-asm.patch b/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-asm.patch deleted file mode 100644 index a66bf70542b..00000000000 --- a/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-asm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN sysklogd-1.4.1/module.h sysklogd-1.4.1.new/module.h ---- sysklogd-1.4.1/module.h 2005-09-28 15:53:58.000000000 +0200 -+++ sysklogd-1.4.1.new/module.h 2005-09-28 15:54:56.000000000 +0200 -@@ -28,7 +28,7 @@ - * recent content from Linux 2.4/2.6. - */ - --#include -+/* #include */ - - #define MODULE_NAME_LEN 60 - diff --git a/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-cvs-20050525-local.diff b/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-cvs-20050525-local.diff deleted file mode 100644 index 5f36fc5e535..00000000000 --- a/pkgs/os-specific/linux/sysklogd/sysklogd-1.4.1-cvs-20050525-local.diff +++ /dev/null @@ -1,901 +0,0 @@ -diff -ruN sysklogd-1.4.1/CHANGES sysklogd-1.4.1.new/CHANGES ---- sysklogd-1.4.1/CHANGES 2001-03-11 20:35:51.000000000 +0100 -+++ sysklogd-1.4.1.new/CHANGES 2006-03-14 16:22:13.000000000 +0100 -@@ -1,3 +1,42 @@ -+Version 1.4.2 -+ -+ . Dmitry V. Levin -+ - Close file descriptor in FindSymbolFile() in ksym.c in order not to -+ leak file descriptors. -+ . Solar Designer -+ - improve crunch_list() -+ - Prevent potential buffer overflow in reading messages from the -+ kernel log ringbuffer. -+ - Ensure that "len" is not placed in a register, and that the -+ endtty() signal handler is not installed too early which could -+ cause a segmentation fault or worse. -+ . Steve Grubb -+ - fix memory calculation in crunch_list() -+ . Martin Schulze -+ - klogd will reconnect to the logger (mostly syslogd) after it went -+ away -+ - On heavily loaded system syslog will not spit out error messages -+ anymore when recvfrom() results in EAGAIN -+ - Makefile improvements -+ - Local copy of module.h -+ - Improved sysklogd.8 -+ - Always log with syslogd's timezone and locale -+ - Remove trailing newline when forwarding messages -+ . Jon Burgess -+ - Moved the installation of the signal handler up a little bit so it -+ guaranteed to be available when the child is forked, hence, fixing a -+ race condition. This used to create problems with UML and fast -+ machines. -+ . Greg Trounson -+ - Improved README.linux -+ . Ulf Härnhammar -+ - Bondary check for fscanf() in InitKsyms() and CheckMapVersion() -+ . Colin Phipps -+ - Don't block on the network socket in case of package los -+ . Dirk Mueller -+ - Don't crash when filesize limit is reached (e.g. without LFS) -+ -+ - Version 1.4.1 - - . klogd will set the console log level only if `-c' is given on the -@@ -30,3 +69,9 @@ - . Olaf Kirch - - Remove Unix Domain Sockets and switch to Datagram Unix Sockets - . Several bugfixes and improvements, please refer to the .c files -+ -+ -+Local variables: -+mode: indented-text -+fill-column: 72 -+End: -diff -ruN sysklogd-1.4.1/klogd.8 sysklogd-1.4.1.new/klogd.8 ---- sysklogd-1.4.1/klogd.8 2001-03-11 20:35:51.000000000 +0100 -+++ sysklogd-1.4.1.new/klogd.8 2006-03-14 16:22:13.000000000 +0100 -@@ -3,8 +3,9 @@ - .\" Sun Jul 30 01:35:55 MET: Martin Schulze: Updates - .\" Sun Nov 19 23:22:21 MET: Martin Schulze: Updates - .\" Mon Aug 19 09:42:08 CDT 1996: Dr. G.W. Wettstein: Updates -+.\" Fri Mar 11 17:11:46 CET 2005: Martin Schulze: sysctl updates - .\" --.TH KLOGD 8 "21 August, 1999" "Version 1.4" "Linux System Administration" -+.TH KLOGD 8 "11 March 2005" "Version 1.4" "Linux System Administration" - .SH NAME - klogd \- Kernel Log Daemon - .LP -@@ -38,6 +39,12 @@ - .TP - .BI "\-c " n - Sets the default log level of console messages to \fIn\fR. -+This should nowardays be configured with the -+.BR sysctl (8) -+program, e.g. via -+.BI "sysctl kernel.printk=" n -+or via -+.IR /etc/sysctl.conf . - .TP - .B "\-d" - Enable debugging mode. This will generate \fBLOTS\fR of output to -@@ -321,7 +328,7 @@ - .B klogd - to reload the module symbol information whenever a protection fault - is detected. Caution should be used before invoking the program in --\'paranoid\' mode. The stability of the kernel and the operating -+\&'paranoid\&' mode. The stability of the kernel and the operating - environment is always under question when a protection fault occurs. - Since the klogd daemon must execute system calls in order to read the - module symbol information there is the possibility that the system may -diff -ruN sysklogd-1.4.1/klogd.c sysklogd-1.4.1.new/klogd.c ---- sysklogd-1.4.1/klogd.c 2001-03-11 20:40:10.000000000 +0100 -+++ sysklogd-1.4.1.new/klogd.c 2006-03-14 16:22:13.000000000 +0100 -@@ -243,6 +243,9 @@ - * people have submitted patches: Troels Walsted Hansen - * , Wolfgang Oertl - * and Thomas Roessler. -+ * Thu Apr 29 15:24:07 2004: Solar Designer -+ * Prevent potential buffer overflow in reading messages from the -+ * kernel log rinbuffer. - */ - - -@@ -938,7 +941,7 @@ - * messages into this fresh buffer. - */ - memset(log_buffer, '\0', sizeof(log_buffer)); -- if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer))) < 0 ) -+ if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer)-1)) < 0 ) - { - if ( errno == EINTR ) - return; -diff -ruN sysklogd-1.4.1/ksym.c sysklogd-1.4.1.new/ksym.c ---- sysklogd-1.4.1/ksym.c 2000-09-12 23:53:31.000000000 +0200 -+++ sysklogd-1.4.1.new/ksym.c 2006-03-14 16:22:13.000000000 +0100 -@@ -105,6 +105,15 @@ - * - * Tue Sep 12 23:48:12 CEST 2000: Martin Schulze - * Close symbol file in InitKsyms() when an error occurred. -+ * -+ * Thu Apr 29 18:07:16 CEST 2004: Dmitry Levin -+ * Close file descriptor in FindSymbolFile() in order not to leak -+ * file descriptors. -+ * -+ * Fri Jul 16 08:32:49 CEST 2004: Ulf Härnhammar -+ * Added boundary check for fscanf() in InitKsyms() and -+ * CheckMapVersion() to prevent an unintended crash when reading -+ * an incorrect System.map. - */ - - -@@ -236,7 +245,7 @@ - */ - while ( !feof(sym_file) ) - { -- if ( fscanf(sym_file, "%lx %c %s\n", &address, &type, sym) -+ if ( fscanf(sym_file, "%lx %c %511s\n", &address, &type, sym) - != 3 ) - { - Syslog(LOG_ERR, "Error in symbol table input (#1)."); -@@ -344,6 +353,7 @@ - if ( (sym_file = fopen(symfile, "r")) != (FILE *) 0 ) { - if (CheckMapVersion(symfile) == 1) - file = symfile; -+ fclose (sym_file); - } - if (sym_file == (FILE *) 0 || file == (char *) 0) { - sprintf (symfile, "%s", *mf); -@@ -352,6 +362,7 @@ - if ( (sym_file = fopen(symfile, "r")) != (FILE *) 0 ) { - if (CheckMapVersion(symfile) == 1) - file = symfile; -+ fclose (sym_file); - } - } - -@@ -533,7 +544,7 @@ - version = 0; - while ( !feof(sym_file) && (version == 0) ) - { -- if ( fscanf(sym_file, "%lx %c %s\n", &address, \ -+ if ( fscanf(sym_file, "%lx %c %511s\n", &address, \ - &type, sym) != 3 ) - { - Syslog(LOG_ERR, "Error in symbol table input (#2)."); -@@ -899,3 +910,11 @@ - return; - } - #endif -+ -+/* -+ * Local variables: -+ * c-indent-level: 8 -+ * c-basic-offset: 8 -+ * tab-width: 8 -+ * End: -+ */ -diff -ruN sysklogd-1.4.1/ksym_mod.c sysklogd-1.4.1.new/ksym_mod.c ---- sysklogd-1.4.1/ksym_mod.c 2000-09-12 23:15:28.000000000 +0200 -+++ sysklogd-1.4.1.new/ksym_mod.c 2006-03-14 16:22:13.000000000 +0100 -@@ -78,6 +78,11 @@ - * - * Tue Sep 12 23:11:13 CEST 2000: Martin Schulze - * Changed llseek() to lseek64() in order to skip a libc warning. -+ * -+ * Wed Mar 31 17:35:01 CEST 2004: Martin Schulze -+ * Removed references to since it doesn't work -+ * anymore with its recent content from Linux 2.4/2.6, created -+ * module.h locally instead. - */ - - -@@ -89,11 +94,12 @@ - #include - #include - #include -+#include "module.h" - #if !defined(__GLIBC__) - #include --#include -+#include - #else /* __GLIBC__ */ --#include -+#include - extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); - extern int get_kernel_syms __P ((struct kernel_sym *__table)); - #endif /* __GLIBC__ */ -@@ -107,7 +113,7 @@ - - #if !defined(__GLIBC__) - /* -- * The following bit uses some kernel/library magic to product what -+ * The following bit uses some kernel/library magic to produce what - * looks like a function call to user level code. This function is - * actually a system call in disguise. The purpose of the getsyms - * call is to return a current copy of the in-kernel symbol table. -diff -ruN sysklogd-1.4.1/Makefile sysklogd-1.4.1.new/Makefile ---- sysklogd-1.4.1/Makefile 1998-10-12 22:25:15.000000000 +0200 -+++ sysklogd-1.4.1.new/Makefile 2006-03-14 16:22:41.000000000 +0100 -@@ -4,12 +4,15 @@ - #CFLAGS= -g -DSYSV -Wall - #LDFLAGS= -g - CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -+# -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - LDFLAGS= -s - - # Look where your install program is. --INSTALL = /usr/bin/install --BINDIR = /usr/sbin --MANDIR = /usr/man -+INSTALL = install -+ -+# Destination paths, set prefix=/opt if required -+BINDIR = $(prefix)/usr/sbin -+MANDIR = $(prefix)/usr/share/man - - # There is one report that under an all ELF system there may be a need to - # explicilty link with libresolv.a. If linking syslogd fails you may wish -@@ -34,8 +37,9 @@ - # The following define establishes ownership for the man pages. - # Avery tells me that there is a difference between Debian and - # Slackware. Rather than choose sides I am leaving it up to the user. --MAN_OWNER = root --# MAN_OWNER = man -+MAN_USER = root -+MAN_GROUP = root -+MAN_PERMS = 644 - - # The following define establishes the name of the pid file for the - # syslogd daemon. The library include file (paths.h) defines the -@@ -116,7 +120,7 @@ - ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd - - install_man: -- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 sysklogd.8 ${MANDIR}/man8/sysklogd.8 -- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 syslogd.8 ${MANDIR}/man8/syslogd.8 -- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 syslog.conf.5 ${MANDIR}/man5/syslog.conf.5 -- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 klogd.8 ${MANDIR}/man8/klogd.8 -+ ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8 -+ ${INSTALL} -m ${MAN_PERMS} syslogd.8 ${MANDIR}/man8/syslogd.8 -+ ${INSTALL} -m ${MAN_PERMS} syslog.conf.5 ${MANDIR}/man5/syslog.conf.5 -+ ${INSTALL} -m ${MAN_PERMS} klogd.8 ${MANDIR}/man8/klogd.8 -diff -ruN sysklogd-1.4.1/module.h sysklogd-1.4.1.new/module.h ---- sysklogd-1.4.1/module.h 1970-01-01 01:00:00.000000000 +0100 -+++ sysklogd-1.4.1.new/module.h 2006-03-14 16:22:13.000000000 +0100 -@@ -0,0 +1,90 @@ -+/* -+ module.h - Miscellaneous module definitions -+ Copyright (c) 1996 Richard Henderson -+ Copyright (c) 2004 Martin Schulze -+ -+ This file is part of the sysklogd package. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+*/ -+ -+/* ChangeLog: -+ * -+ * Wed Mar 31 17:35:01 CEST 2004: Martin Schulze -+ * Created local copy of module.h based on the content of Linux -+ * 2.2 since doesn't work anymore with its -+ * recent content from Linux 2.4/2.6. -+ */ -+ -+#include -+ -+#define MODULE_NAME_LEN 60 -+ -+struct kernel_sym -+{ -+ unsigned long value; -+ char name[MODULE_NAME_LEN]; -+}; -+ -+ -+struct list_head { -+ struct list_head *next, *prev; -+}; -+ -+ -+struct module_info -+{ -+ unsigned long addr; -+ unsigned long size; -+ unsigned long flags; -+ long usecount; -+}; -+ -+ -+struct module -+{ -+ unsigned long size_of_struct; /* == sizeof(module) */ -+ struct module *next; -+ const char *name; -+ unsigned long size; -+ -+ union -+ { -+ int usecount; -+ long pad; -+ } uc; /* Needs to keep its size - so says rth */ -+ -+ unsigned long flags; /* AUTOCLEAN et al */ -+ -+ unsigned nsyms; -+ unsigned ndeps; -+ -+ struct module_symbol *syms; -+ struct module_ref *deps; -+ struct module_ref *refs; -+ int (*init)(void); -+ void (*cleanup)(void); -+ const struct exception_table_entry *ex_table_start; -+ const struct exception_table_entry *ex_table_end; -+#ifdef __alpha__ -+ unsigned long gp; -+#endif -+ /* Members past this point are extensions to the basic -+ module support and are optional. Use mod_opt_member() -+ to examine them. */ -+ const struct module_persist *persist_start; -+ const struct module_persist *persist_end; -+ int (*can_unload)(void); -+}; -diff -ruN sysklogd-1.4.1/pidfile.c sysklogd-1.4.1.new/pidfile.c ---- sysklogd-1.4.1/pidfile.c 1998-02-10 23:37:12.000000000 +0100 -+++ sysklogd-1.4.1.new/pidfile.c 2006-03-14 16:22:13.000000000 +0100 -@@ -87,7 +87,7 @@ - int fd; - int pid; - -- if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1) -+ if ( ((fd = open(pidfile, O_RDWR|O_CREAT|O_TRUNC, 0644)) == -1) - || ((f = fdopen(fd, "r+")) == NULL) ) { - fprintf(stderr, "Can't open or create %s.\n", pidfile); - return 0; -diff -ruN sysklogd-1.4.1/README.1st sysklogd-1.4.1.new/README.1st ---- sysklogd-1.4.1/README.1st 1997-06-02 19:21:39.000000000 +0200 -+++ sysklogd-1.4.1.new/README.1st 2006-03-14 16:22:13.000000000 +0100 -@@ -1,5 +1,5 @@ --Very important information before using version 1.3 ----------------------------------------------------- -+Important information -+--------------------- - - The included version of syslogd behaves in a slightly different manner - to the one in former releases. Please review the following important -@@ -63,3 +63,10 @@ - these scripts should remove all old .pid files found in /var/run. - This will insure that klogd and syslogd start properly even if prior - executions have been terminated harshly. -+ -+* Large file support, i.e. support to write to log files that are -+ larger than 2 GB is not part of syslogd, but a matter of the Glibc -+ emitting different system calls to the kernel interface. To support -+ large files you'll have to compile syslogd with the compiler defines -+ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE so that glibc adjusts the -+ system calls. -diff -ruN sysklogd-1.4.1/README.linux sysklogd-1.4.1.new/README.linux ---- sysklogd-1.4.1/README.linux 1999-01-19 01:09:12.000000000 +0100 -+++ sysklogd-1.4.1.new/README.linux 2006-03-14 16:22:13.000000000 +0100 -@@ -40,12 +40,17 @@ - a useful addition to the software gene pool. - - There is a mailing list covering this package and syslog in general. --The lists address is sysklogd@Infodrom.North.DE . To subscribe send a --mail to Majordomo@Infodrom.North.DE with a line "subscribe sysklogd" -+The lists address is infodrom-sysklogd@lists.infodrom.org . To subscribe send a -+mail to majordomo@lists.infodrom.org with a line "subscribe infodrom-sysklogd" - in the message body. - --New versions of this package will be available at Joey's ftp server. --ftp://ftp.infodrom.north.de/pub/people/joey/sysklogd/ -+A second mailing list exists as infodrom-sysklogd-cvs@lists.infodrom.org. Only -+CVS messages and diffs are distributed there. Whenever new code is added to -+sysklogd, CVS generates a mail from these changes which will be sent to -+this list. Discussions will take place on the first list. -+ -+The latest version of this software can be found at: -+http://www.infodrom.org/projects/sysklogd/download.php3 - - Best regards, - -@@ -67,6 +72,6 @@ - - Martin Schulze - Infodrom Oldenburg --joey@linux.de -+joey@infodrom.org - --And a host of bug reporters whose contributions cannot be underestimated. -+And a number of bug reporters whose contributions cannot be underestimated. -diff -ruN sysklogd-1.4.1/sysklogd.8 sysklogd-1.4.1.new/sysklogd.8 ---- sysklogd-1.4.1/sysklogd.8 2001-03-11 20:35:51.000000000 +0100 -+++ sysklogd-1.4.1.new/sysklogd.8 2006-03-14 16:22:13.000000000 +0100 -@@ -84,7 +84,7 @@ - .B MAXFUNIX - within the syslogd.c source file. An example for a chroot() daemon is - described by the people from OpenBSD at --http://www.psionic.com/papers/dns.html. -+. - .TP - .B "\-d" - Turns on debug mode. Using this the daemon will not proceed a -@@ -117,7 +117,8 @@ - between two \fI-- MARK --\fR lines is 20 minutes. This can be changed - with this option. Setting the - .I interval --to zero turns it off entirely. -+to zero turns it off entirely. Depending on other log messages -+generated these lines may not be written consecutively. - .TP - .B "\-n" - Avoid auto-backgrounding. This is needed especially if the -@@ -364,8 +365,10 @@ - - To avoid this in further times no messages that were received from a - remote host are sent out to another (or the same) remote host --anymore. If there are scenarios where this doesn't make sense, please --drop me (Joey) a line. -+anymore. If you experience are setup in which this doesn't make -+sense, please use the -+.B \-h -+commandline switch. - - If the remote host is located in the same domain as the host, - .B syslogd -diff -ruN sysklogd-1.4.1/syslog.c sysklogd-1.4.1.new/syslog.c ---- sysklogd-1.4.1/syslog.c 2001-03-11 20:35:51.000000000 +0100 -+++ sysklogd-1.4.1.new/syslog.c 2006-03-14 16:22:13.000000000 +0100 -@@ -47,6 +47,9 @@ - * Sun Mar 11 20:23:44 CET 2001: Martin Schulze - * Use SOCK_DGRAM for loggin, renables it to work. - * -+ * Wed Aug 27 17:48:16 CEST 2003: Martin Schulze -+ * Improved patch by Michael Pomraning to -+ * reconnect klogd to the logger after it went away. - */ - - #include -@@ -98,6 +101,7 @@ - register char *p; - time_t now; - int fd, saved_errno; -+ int result; - char tbuf[2048], fmt_cpy[1024], *stdp = (char *) 0; - - saved_errno = errno; -@@ -167,7 +171,16 @@ - } - - /* output the message to the local logger */ -- if (write(LogFile, tbuf, cnt + 1) >= 0 || !(LogStat&LOG_CONS)) -+ result = write(LogFile, tbuf, cnt + 1); -+ -+ if (result == -1 -+ && (errno == ECONNRESET || errno == ENOTCONN || errno == ECONNREFUSED)) { -+ closelog(); -+ openlog(LogTag, LogStat | LOG_NDELAY, LogFacility); -+ result = write(LogFile, tbuf, cnt + 1); -+ } -+ -+ if (result >= 0 || !(LogStat&LOG_CONS)) - return; - - /* -diff -ruN sysklogd-1.4.1/syslog.conf.5 sysklogd-1.4.1.new/syslog.conf.5 ---- sysklogd-1.4.1/syslog.conf.5 1999-08-21 12:49:14.000000000 +0200 -+++ sysklogd-1.4.1.new/syslog.conf.5 2006-03-14 16:22:13.000000000 +0100 -@@ -64,7 +64,7 @@ - The - .I facility - is one of the following keywords: --.BR auth ", " authpriv ", " cron ", " daemon ", " kern ", " lpr ", " -+.BR auth ", " authpriv ", " cron ", " daemon ", " ftp ", " kern ", " lpr ", " - .BR mail ", " mark ", " news ", " security " (same as " auth "), " - .BR syslog ", " user ", " uucp " and " local0 " through " local7 . - The keyword -@@ -121,12 +121,21 @@ - - This - .BR syslogd (8) --has a syntax extension to the original BSD source, that makes its use -+has a syntax extension to the original BSD source, which makes its use - more intuitively. You may precede every priority with an equation sign --(``='') to specify only this single priority and not any of the --above. You may also (both is valid, too) precede the priority with an --exclamation mark (``!'') to ignore all that priorities, either exact --this one or this and any higher priority. If you use both extensions -+(``='') to specify that -+.B syslogd -+should only refer to this single priority and not this priority and -+all higher priorities. -+ -+You may also precide the priority with an exclamation mark (``!'') if -+you want -+.B syslogd -+to ignore this priority and all higher priorities. -+You may even use both, the exclamation mark and the equation sign if -+you want -+.B syslogd -+to ignore only this single priority. If you use both extensions - than the exclamation mark must occur before the equation sign, just - use it intuitively. - -@@ -300,7 +309,7 @@ - .B syslogd - log all messages that come with either the - .BR info " or the " notice --facility into the file -+priority into the file - .IR /var/log/messages , - except for all messages that use the - .B mail -diff -ruN sysklogd-1.4.1/syslogd.c sysklogd-1.4.1.new/syslogd.c ---- sysklogd-1.4.1/syslogd.c 2001-03-11 20:40:10.000000000 +0100 -+++ sysklogd-1.4.1.new/syslogd.c 2006-03-14 16:22:13.000000000 +0100 -@@ -441,6 +441,39 @@ - * Don't return a closed fd if `-a' is called with a wrong path. - * Thanks to Bill Nottingham for providing - * a patch. -+ * Thu Apr 13 05:08:10 CEST 2001: Jon Burgess -+ * Moved the installation of the signal handler up a little bit -+ * so it guaranteed to be available when the child is forked, -+ * hence, fixing a race condition. This used to create problems -+ * with UML and fast machines. -+ * -+ * Sat Apr 17 18:03:05 CEST 2004: Steve Grubb -+ * Correct memory allocation for for commandline arguments in -+ * crunch_list(). -+ * -+ * Thu Apr 29 12:38:39 CEST 2004: Solar Designer -+ * Applied Openwall paranoia patches to improve crunch_list(). -+ * -+ * Tue May 4 16:47:30 CEST 2004: Solar Designer -+ * Ensure that "len" is not placed in a register, and that the -+ * endtty() signal handler is not installed too early which could -+ * cause a segmentation fault or worse. -+ * -+ * Tue May 4 16:52:01 CEST 2004: Solar Designer -+ * Adjust the size of a variable to prevent a buffer overflow -+ * should _PATH_DEV ever contain something different than "/dev/". -+ * -+ * Tue Nov 2 20:28:23 CET 2004: Colin Phipps -+ * Don't block on the network socket, in case a packet gets lost -+ * between select and recv. -+ * -+ * Sun Nov 7 12:28:47 CET 2004: Martin Schulze -+ * Discard any timestamp information found in received syslog -+ * messages. This will affect local messages sent from a -+ * different timezone. -+ * -+ * Sun Nov 7 13:47:00 CET 2004: Martin Schulze -+ * Remove trailing newline when forwarding messages. - */ - - -@@ -890,11 +923,11 @@ - dprintf("Checking pidfile.\n"); - if (!check_pid(PidFile)) - { -+ signal (SIGTERM, doexit); - if (fork()) { - /* - * Parent process - */ -- signal (SIGTERM, doexit); - sleep(300); - /* - * Not reached unless something major went wrong. 5 -@@ -992,6 +1025,7 @@ - (void) signal(SIGCHLD, reapchild); - (void) signal(SIGALRM, domark); - (void) signal(SIGUSR1, Debug ? debug_switch : SIG_IGN); -+ (void) signal(SIGXFSZ, SIG_IGN); - (void) alarm(TIMERINTVL); - - /* Create a partial message table for all file descriptors. */ -@@ -1141,13 +1175,13 @@ - */ - printchopped(from, line, \ - i + 2, finet); -- } else if (i < 0 && errno != EINTR) { -+ } else if (i < 0 && errno != EINTR && errno != EAGAIN) { - dprintf("INET socket error: %d = %s.\n", \ - errno, strerror(errno)); - logerror("recvfrom inet"); - /* should be harmless now that we set - * BSDCOMPAT on the socket */ -- sleep(10); -+ sleep(1); - } - } - #endif -@@ -1216,6 +1250,7 @@ - { - int fd, on = 1; - struct sockaddr_in sin; -+ int sockflags; - - fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd < 0) { -@@ -1241,6 +1276,24 @@ - close(fd); - return -1; - } -+ /* We must not block on the network socket, in case a packet -+ * gets lost between select and recv, otherise the process -+ * will stall until the timeout, and other processes trying to -+ * log will also stall. -+ */ -+ if ((sockflags = fcntl(fd, F_GETFL)) != -1) { -+ sockflags |= O_NONBLOCK; -+ /* -+ * SETFL could fail too, so get it caught by the subsequent -+ * error check. -+ */ -+ sockflags = fcntl(fd, F_SETFL, sockflags); -+ } -+ if (sockflags == -1) { -+ logerror("fcntl(O_NONBLOCK), suspending inet"); -+ close(fd); -+ return -1; -+ } - if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) { - logerror("bind, suspending inet"); - close(fd); -@@ -1254,30 +1307,26 @@ - crunch_list(list) - char *list; - { -- int count, i; -+ int i, m, n; - char *p, *q; - char **result = NULL; - - p = list; - - /* strip off trailing delimiters */ -- while (p[strlen(p)-1] == LIST_DELIMITER) { -- count--; -+ while (*p && p[strlen(p)-1] == LIST_DELIMITER) - p[strlen(p)-1] = '\0'; -- } - /* cut off leading delimiters */ -- while (p[0] == LIST_DELIMITER) { -- count--; -+ while (p[0] == LIST_DELIMITER) - p++; -- } - -- /* count delimiters to calculate elements */ -- for (count=i=0; p[i]; i++) -- if (p[i] == LIST_DELIMITER) count++; -+ /* count delimiters to calculate the number of elements */ -+ for (n = i = 0; p[i]; i++) -+ if (p[i] == LIST_DELIMITER) n++; - -- if ((result = (char **)malloc(sizeof(char *) * count+2)) == NULL) { -+ if ((result = (char **)malloc(sizeof(char *) * (n + 2))) == NULL) { - printf ("Sorry, can't get enough memory, exiting.\n"); -- exit(0); -+ exit(1); - } - - /* -@@ -1285,30 +1334,28 @@ - * characters are different from any delimiters, - * so we don't have to care about this. - */ -- count = 0; -- while ((q=strchr(p, LIST_DELIMITER))) { -- result[count] = (char *) malloc((q - p + 1) * sizeof(char)); -- if (result[count] == NULL) { -+ m = 0; -+ while ((q = strchr(p, LIST_DELIMITER)) && m < n) { -+ result[m] = (char *) malloc((q - p + 1) * sizeof(char)); -+ if (result[m] == NULL) { - printf ("Sorry, can't get enough memory, exiting.\n"); -- exit(0); -+ exit(1); - } -- strncpy(result[count], p, q - p); -- result[count][q - p] = '\0'; -+ memcpy(result[m], p, q - p); -+ result[m][q - p] = '\0'; - p = q; p++; -- count++; -+ m++; - } -- if ((result[count] = \ -- (char *)malloc(sizeof(char) * strlen(p) + 1)) == NULL) { -+ if ((result[m] = strdup(p)) == NULL) { - printf ("Sorry, can't get enough memory, exiting.\n"); -- exit(0); -+ exit(1); - } -- strcpy(result[count],p); -- result[++count] = NULL; -+ result[++m] = NULL; - - #if 0 -- count=0; -- while (result[count]) -- dprintf ("#%d: %s\n", count, StripDomains[count++]); -+ m = 0; -+ while (result[m]) -+ dprintf ("#%d: %s\n", m, result[m++]); - #endif - return result; - } -@@ -1539,30 +1586,48 @@ - int fac, prilev, lognum; - int msglen; - char *timestamp; -+#ifdef __gnu_linux__ -+ sigset_t mask; -+#else -+#ifndef SYSV -+ sigset_t omask; -+#endif -+#endif - - dprintf("logmsg: %s, flags %x, from %s, msg %s\n", textpri(pri), flags, from, msg); - -+#ifdef __gnu_linux__ -+ sigemptyset(&mask); -+ sigaddset(&mask, SIGHUP); -+ sigaddset(&mask, SIGALRM); -+ sigprocmask(SIG_BLOCK, &mask, NULL); -+#else - #ifndef SYSV - omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM)); - #endif -+#endif - - /* - * Check to see if msg looks non-standard. -+ * -+ * A message looks like -+ * Nov 17 11:42:33 CRON[ -+ * 01234567890123456 -+ * ^ ^ ^ ^ ^ -+ * -+ * Remote messages are not accompanied by a timestamp. -+ * Local messages are accompanied by a timestamp (program's timezone) - */ - msglen = strlen(msg); -- if (msglen < 16 || msg[3] != ' ' || msg[6] != ' ' || -- msg[9] != ':' || msg[12] != ':' || msg[15] != ' ') -- flags |= ADDDATE; -- -- (void) time(&now); -- if (flags & ADDDATE) -- timestamp = ctime(&now) + 4; -- else { -- timestamp = msg; -+ if (!(msglen < 16 || msg[3] != ' ' || msg[6] != ' ' || -+ msg[9] != ':' || msg[12] != ':' || msg[15] != ' ')) { - msg += 16; - msglen -= 16; - } - -+ (void) time(&now); -+ timestamp = ctime(&now) + 4; -+ - /* extract facility and priority level */ - if (flags & MARK) - fac = LOG_NFACILITIES; -@@ -1581,9 +1646,13 @@ - (void) close(f->f_file); - f->f_file = -1; - } -+#ifdef __gnu_linux__ -+ sigprocmask(SIG_UNBLOCK, &mask, NULL); -+#else - #ifndef SYSV - (void) sigsetmask(omask); - #endif -+#endif - return; - } - #ifdef SYSV -@@ -1646,9 +1715,13 @@ - } - } - } -+#ifdef __gnu_linux__ -+ sigprocmask(SIG_UNBLOCK, &mask, NULL); -+#else - #ifndef SYSV - (void) sigsetmask(omask); - #endif -+#endif - } - #if FALSE - } /* balance parentheses for emacs */ -@@ -1771,7 +1844,7 @@ - dprintf("Not sending message to remote.\n"); - else { - f->f_time = now; -- (void) snprintf(line, sizeof(line), "<%d>%s\n", f->f_prevpri, \ -+ (void) snprintf(line, sizeof(line), "<%d>%s", f->f_prevpri, \ - (char *) iov[4].iov_base); - l = strlen(line); - if (l > MAXLINE) -@@ -1815,7 +1888,7 @@ - v->iov_len = 1; - } - again: -- /* f->f_file == -1 is an indicator that the we couldn't -+ /* f->f_file == -1 is an indicator that we couldn't - open the file at startup. */ - if (f->f_file == -1) - break; -@@ -1852,7 +1925,7 @@ - errno = e; - logerror(f->f_un.f_fname); - } -- } else if (f->f_flags & SYNC_FILE) -+ } else if (f->f_type == F_FILE && (f->f_flags & SYNC_FILE)) - (void) fsync(f->f_file); - break; - -@@ -1891,7 +1964,7 @@ - register struct filed *f; - struct iovec *iov; - { -- char p[6 + UNAMESZ]; -+ char p[sizeof (_PATH_DEV) + UNAMESZ]; - register int i; - int ttyf, len; - static int reenter = 0; -@@ -1899,6 +1972,8 @@ - struct utmp *uptr; - char greetings[200]; - -+ (void) &len; -+ - if (reenter++) - return; - -@@ -1913,7 +1988,6 @@ - if (fork() == 0) { - (void) signal(SIGTERM, SIG_DFL); - (void) alarm(0); -- (void) signal(SIGALRM, endtty); - #ifndef SYSV - (void) signal(SIGTTOU, SIG_IGN); - (void) sigsetmask(0); -@@ -1929,7 +2003,7 @@ - /* is this slot used? */ - if (ut.ut_name[0] == '\0') - continue; -- if (ut.ut_type == LOGIN_PROCESS) -+ if (ut.ut_type != USER_PROCESS) - continue; - if (!(strcmp (ut.ut_name,"LOGIN"))) /* paranoia */ - continue; -@@ -1959,6 +2033,7 @@ - iov[1].iov_len = 0; - } - if (setjmp(ttybuf) == 0) { -+ (void) signal(SIGALRM, endtty); - (void) alarm(15); - /* open the terminal */ - ttyf = open(p, O_WRONLY|O_NOCTTY); diff --git a/pkgs/servers/sql/mysql5/default.nix b/pkgs/servers/sql/mysql5/default.nix index d76a81184d2..89107d10864 100644 --- a/pkgs/servers/sql/mysql5/default.nix +++ b/pkgs/servers/sql/mysql5/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ps, ncurses, zlib ? null, perl}: +args: with args; # Note: zlib is not required; MySQL can use an internal zlib. @@ -10,7 +10,8 @@ stdenv.mkDerivation { sha256 = "e4443d8dc859ed53bd9f3bef143ce30c7f5dee66a02748e9a003136be25e0060"; }; - buildInputs = [ps ncurses zlib perl]; + buildInputs = [ps ncurses zlib perl openssl]; + postInstall = "ln -s mysqld_safe $out/bin/mysqld"; - configureFlags = "--enable-thread-safe-client"; + configureFlags = "--enable-thread-safe-client --with-embedded-server --disable-static --with-openssl=${openssl} --with-berkeley-db"; } diff --git a/pkgs/servers/sql/postgresql/8.2.6.nix b/pkgs/servers/sql/postgresql/8.2.6.nix new file mode 100644 index 00000000000..f5ce8741f86 --- /dev/null +++ b/pkgs/servers/sql/postgresql/8.2.6.nix @@ -0,0 +1,14 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "postgresql-" + version; + LC_ALL = "en_US"; + + src = fetchurl { + url = "ftp://ftp.de.postgresql.org/mirror/postgresql/source/v${version}/${name}.tar.bz2"; + sha256="056ixbsfmdwhniryc0mr1kl66jywkqqhqvjdi7i3v4qzh9z34hgf"; + }; + + passthru = { inherit readline; }; + buildInputs = [zlib ncurses readline]; +} diff --git a/pkgs/servers/sql/postgresql/8.3.0.nix b/pkgs/servers/sql/postgresql/8.3.0.nix new file mode 100644 index 00000000000..04244fff85b --- /dev/null +++ b/pkgs/servers/sql/postgresql/8.3.0.nix @@ -0,0 +1,14 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "postgresql-" + version; + LC_ALL = "en_US"; + + src = fetchurl { + url = "ftp://ftp.de.postgresql.org/mirror/postgresql/source/v${version}/${name}.tar.bz2"; + sha256="19kf0q45d5zd1rxffin0iblizckk8cp6fpgb52sipqkpnmm6sdc5"; + }; + + passthru = { inherit readline; }; + buildInputs = [zlib ncurses readline]; +} diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 0fc27acbc1f..9ce0ce47bc8 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1,8 +1,5 @@ # This is a generated file. Do not edit! -{ stdenv, fetchurl, pkgconfig, freetype, fontconfig -, libxslt, expat, libdrm, libpng, zlib, perl, mesa, mesaHeaders -, xkeyboard_config, gettext -}: +args: with args; rec { @@ -883,8 +880,9 @@ rec { url = http://mirror.switch.ch/ftp/mirror/X11/pub/X11R7.3/src/everything/libXpm-3.5.7.tar.bz2; sha256 = "1aibr6y6hnlgc7m1a1y5s1qx7863praq4pdp0xrpkc75gkk1lw34"; }; - buildInputs = [pkgconfig gettext libX11 libXext xextproto xproto libXt ]; - }) // {inherit gettext libX11 libXext xextproto xproto libXt ;}; + buildInputs = [pkgconfig libX11 libXext xextproto xproto libXt ]; + patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in"; + }) // {inherit libX11 libXext xextproto xproto libXt ;}; libXprintAppUtil = (stdenv.mkDerivation { name = "libXprintAppUtil-1.0.1"; @@ -1283,7 +1281,7 @@ rec { url = http://mirror.switch.ch/ftp/mirror/X11/pub/X11R7.3/src/everything/setxkbmap-1.0.4.tar.bz2; sha256 = "1b1brw1v98q2rqhr5x7f8mr3clxq62nw5175gpamg5s172916nwv"; }; - buildInputs = [pkgconfig libX11 libxkbfile ]; postInstall = "ensureDir $out/share; ln -sfn ${xkeyboard_config}/etc/X11 $out/share/X11"; + buildInputs = [pkgconfig libX11 libxkbfile ]; postInstall = "ensureDir $out/share; ln -sfn ${xkeyboard_config}/etc/X11 $out/share/X11"; }) // {inherit libX11 libxkbfile ;}; showfont = (stdenv.mkDerivation { @@ -1744,7 +1742,7 @@ rec { sha256 = "15avwy8isbqagzcdj20ngqajl22k40pssfx7vjirhrqyyq19fiwb"; }; preBuild = " - sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c + sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c "; buildInputs = [pkgconfig inputproto kbproto randrproto xorgserver xproto ]; }) // {inherit inputproto kbproto randrproto xorgserver xproto ;}; @@ -2716,8 +2714,8 @@ rec { url = http://mirror.switch.ch/ftp/mirror/X11/pub/X11R7.3/src/everything/xorg-server-1.4.tar.bz2; sha256 = "1hpbq0bl1jkq84gvksp0xzbbrwwgl0wz2wakf11p2hld6bgl5cai"; }; - buildInputs = [pkgconfig pixman renderproto bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto freetype glproto inputproto kbproto libdrm mkfontdir mkfontscale perl printproto randrproto recordproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfixes libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ]; mesaSrc = mesa.src; x11BuildHook = ./xorgserver.sh; patches = [./xorgserver-dri-path.patch ./xorgserver-xkbcomp-path.patch ./xorgserver-xkb-leds.patch ]; - }) // {inherit pixman renderproto bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto freetype glproto inputproto kbproto libdrm mkfontdir mkfontscale perl printproto randrproto recordproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfixes libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ;}; + buildInputs = [pkgconfig pixman renderproto bigreqsproto compositeproto damageproto dbus.libs libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto freetype glproto hal inputproto kbproto libdrm mkfontdir mkfontscale perl printproto randrproto recordproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfixes libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ]; mesaSrc = mesa.src; x11BuildHook = ./xorgserver.sh; patches = [./xorgserver-dri-path.patch ./xorgserver-xkbcomp-path.patch ./xorgserver-xkb-leds.patch ]; + }) // {inherit pixman renderproto bigreqsproto compositeproto damageproto libdmx dmxproto evieext fixesproto fontcacheproto libfontenc fontsproto freetype glproto hal inputproto kbproto libdrm mkfontdir mkfontscale perl printproto randrproto recordproto resourceproto scrnsaverproto trapproto videoproto libX11 libXau libXaw xcmiscproto libXdmcp libXext xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto xf86vidmodeproto libXfixes libXfont libXi xineramaproto libxkbfile libxkbui libXmu libXpm xproto libXrender libXres libXt xtrans libXtst libXxf86misc libXxf86vm zlib ;}; xorgsgmldoctools = (stdenv.mkDerivation { name = "xorg-sgml-doctools-1.2"; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index d68944bf71a..7fb12233044 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -35,7 +35,8 @@ $pcMap{"mkfontscale"} = "mkfontscale"; $pcMap{"mkfontdir"} = "mkfontdir"; $pcMap{"bdftopcf"} = "bdftopcf"; $pcMap{"libxslt"} = "libxslt"; -$pcMap{"gettext"} = "gettext"; +$pcMap{"dbus-1"} = "dbus"; +$pcMap{"hal"} = "hal"; $pcMap{"\$PIXMAN"} = "pixman"; $pcMap{"\$RENDERPROTO"} = "renderproto"; @@ -56,6 +57,8 @@ $extraAttrs{"xf86inputevdev"} = " sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c \";"; +$extraAttrs{"libXpm"} = " + patchPhase = \"sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in\";"; my $downloadCache = "./download-cache"; $ENV{'NIX_DOWNLOAD_CACHE'} = $downloadCache; @@ -112,7 +115,7 @@ while (<>) { my $file; { local $/; - open FOO, "cd '$tmpDir'/* && cat configure.ac |"; + open FOO, "cd '$tmpDir'/* && grep -v '^ *#' configure.ac |"; $file = ; close FOO; } @@ -184,7 +187,6 @@ while (<>) { push @requires, "zlib" if $pkg =~ /xorgserver/; push @requires, "xf86bigfontproto" if $pkg =~ /xorgserver/; push @requires, "libxslt" if $pkg =~ /libxcb/; - push @requires, "gettext" if $pkg =~ /libXpm/; print "REQUIRES @requires => $pkg\n"; $pkgRequires{$pkg} = \@requires; @@ -200,10 +202,7 @@ open OUT, ">default2.nix"; print OUT ""; print OUT < ncurses != null; stdenv.mkDerivation { - name = "bash-3.2-p17"; + name = "bash-3.2-p33"; src = fetchurl { - url = http://losser.st-lab.cs.uu.nl/~eelco/dist/bash-3.2-p17.tar.bz2; - sha256 = "153gg2z2s3ar7vni3345nnmdisha4b8cxzsj79d8ap6m6i4c35f5"; + url = http://losser.st-lab.cs.uu.nl/~eelco/dist/bash-3.2-p33.tar.bz2; + sha256 = "11fv73nbcckmm4f1q9cf73754chsgfps9pklwcaj2ryfd5ql9wnb"; }; postInstall = "ln -s bash $out/bin/sh"; @@ -21,6 +21,7 @@ stdenv.mkDerivation { buildInputs = [bison] ++ stdenv.lib.optional interactive ncurses; meta = { + homepage = http://www.gnu.org/software/bash/; description = "GNU Bourne-Again Shell, the de facto standard shell on Linux" + (if interactive then " (for interactive use)" else ""); diff --git a/pkgs/stdenv/common-path.nix b/pkgs/stdenv/common-path.nix index 0ad0d83255b..3b267a543c6 100644 --- a/pkgs/stdenv/common-path.nix +++ b/pkgs/stdenv/common-path.nix @@ -11,4 +11,5 @@ pkgs.gnumake pkgs.bash pkgs.patch + pkgs.replace ] diff --git a/pkgs/stdenv/cygwin/prehook.sh b/pkgs/stdenv/cygwin/prehook.sh index 673640c0d4a..b2ada869b29 100644 --- a/pkgs/stdenv/cygwin/prehook.sh +++ b/pkgs/stdenv/cygwin/prehook.sh @@ -3,3 +3,5 @@ export NIX_ENFORCE_PURITY= if test -z "$cygwinConfigureEnableShared"; then export configureFlags="$configureFlags --disable-shared" fi + +PATH_DELIMITER=';' diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index ee2dbb3d0f9..0af3210dbc9 100644 --- a/pkgs/stdenv/generic/builder.sh +++ b/pkgs/stdenv/generic/builder.sh @@ -3,19 +3,26 @@ p2=$param2 p3=$param3 p4=$param4 p5=$param5 +_preHook="$preHook" +_postHook="$postHook" +preHook= +postHook= source $stdenv/setup mkdir $out -substitute "$setup" "$out/setup" \ - --subst-var preHook \ - --subst-var postHook \ - --subst-var initialPath \ - --subst-var gcc \ - --subst-var shell \ - --subst-var-by param1 "$p1" \ - --subst-var-by param2 "$p2" \ - --subst-var-by param3 "$p3" \ - --subst-var-by param4 "$p4" \ - --subst-var-by param5 "$p5" +# Can't use substitute() here, because replace may not have been +# built yet (in the bootstrap). +sed \ + -e "s^@preHook@^$_preHook^g" \ + -e "s^@postHook@^$_postHook^g" \ + -e "s^@initialPath@^$initialPath^g" \ + -e "s^@gcc@^$gcc^g" \ + -e "s^@shell@^$shell^g" \ + -e "s^@param1@^$p1^g" \ + -e "s^@param2@^$p2^g" \ + -e "s^@param3@^$p3^g" \ + -e "s^@param4@^$p4^g" \ + -e "s^@param5@^$p5^g" \ + < "$setup" > "$out/setup" diff --git a/pkgs/stdenv/generic/setup-new-2.sh b/pkgs/stdenv/generic/setup-new-2.sh deleted file mode 100644 index 5e330846a4d..00000000000 --- a/pkgs/stdenv/generic/setup-new-2.sh +++ /dev/null @@ -1,878 +0,0 @@ -set -e - -test -z $NIX_GCC && NIX_GCC=@gcc@ - -if [ -z ${system##*cygwin*} ]; then - PATH_DELIMITER=';' -else - PATH_DELIMITER=':' -fi - -addToSearchPathWithCustomDelimiter() { - local delimiter=$1 - local varName=$2 - local needDir=$3 - local addDir=${4:-$needDir} - local prefix=$5 - if [ -d $prefix$needDir ]; then - if [ -z ${!varName} ]; then - eval export ${varName}=${prefix}$addDir - else - eval export ${varName}=${!varName}${delimiter}${prefix}$addDir - fi - fi -} - -addToSearchPath() -{ - addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" -} - -# Set up the initial path. -PATH= -for i in $NIX_GCC @initialPath@; do - PATH=$PATH${PATH:+:}$i/bin -done - -if test "$NIX_DEBUG" = "1"; then - echo "Initial path: $PATH" -fi - - -# Execute the pre-hook. -export SHELL=@shell@ -if test -z "$shell"; then - export shell=@shell@ -fi -param1=@param1@ -param2=@param2@ -param3=@param3@ -param4=@param4@ -param5=@param5@ -if test -n "@preHook@"; then - source @preHook@ -fi - - -# Check that the pre-hook initialised SHELL. -if test -z "$SHELL"; then echo "SHELL not set"; exit 1; fi - - -# Hack: run gcc's setup hook. -envHooks=() -if test -f $NIX_GCC/nix-support/setup-hook; then - source $NIX_GCC/nix-support/setup-hook -fi - - -# Ensure that the given directories exists. -ensureDir() { - local dir - for dir in "$@"; do - if ! test -x "$dir"; then mkdir -p "$dir"; fi - done -} - -installBin() { - ensureDir $out/bin - cp "$@" $out/bin -} - -assertEnvExists(){ - if test -z "${!1}"; then - msg=${2:-error: assertion failed: env var $1 is required} - echo $msg >&2; exit 1 - fi -} - -# Called when some build action fails. If $succeedOnFailure is set, -# create the file `$out/nix-support/failed' to signal failure, and -# exit normally. Otherwise, exit with failure. -fail() { - exitCode=$? - if test "$succeedOnFailure" = 1; then - ensureDir "$out/nix-support" - touch "$out/nix-support/failed" - exit 0 - else - exit $? - fi -} - - -# Allow the caller to augment buildInputs (it's not always possible to -# do this before the call to setup.sh, since the PATH is empty at that -# point; here we have a basic Unix environment). -eval "$addInputsHook" - - -# Recursively find all build inputs. -findInputs() -{ - local pkg=$1 - - case $pkgs in - *\ $pkg\ *) - return 0 - ;; - esac - - pkgs="$pkgs $pkg " - - if test -f $pkg/nix-support/setup-hook; then - source $pkg/nix-support/setup-hook - fi - - if test -f $pkg/nix-support/propagated-build-inputs; then - for i in $(cat $pkg/nix-support/propagated-build-inputs); do - findInputs $i - done - fi -} - -pkgs="" -if test -n "$buildinputs"; then - buildInputs="$buildinputs" # compatibility -fi -for i in $buildInputs $propagatedBuildInputs; do - findInputs $i -done - - -# Set the relevant environment variables to point to the build inputs -# found above. -addToEnv() -{ - local pkg=$1 - - if test "$ignoreFailedInputs" != "1" -a -e $1/nix-support/failed; then - echo "failed input $1" >&2 - fail - fi - - if test -d $1/bin; then - export _PATH=$_PATH${_PATH:+:}$1/bin - fi - - for i in "${envHooks[@]}"; do - $i $pkg - done -} - -for i in $pkgs; do - addToEnv $i -done - - -# Add the output as an rpath. -if test "$NIX_NO_SELF_RPATH" != "1"; then - export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS" -fi - - -# Strip debug information by default. -if test -z "$NIX_STRIP_DEBUG"; then - export NIX_STRIP_DEBUG=1 - export NIX_CFLAGS_STRIP="-g0 -Wl,--strip-debug" -fi - - -assertEnvExists NIX_STORE \ - "Error: you have an old version of Nix that does not set the - NIX_STORE variable. This is required for purity checking. - Please upgrade." - -assertEnvExists NIX_BUILD_TOP \ - "Error: you have an old version of Nix that does not set the - NIX_BUILD_TOP variable. This is required for purity checking. - Please upgrade." - - -# Set the TZ (timezone) environment variable, otherwise commands like -# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must -# be set--see zic manual page 2004'). -export TZ=UTC - - -# Set the prefix. This is generally $out, but it can be overriden, -# for instance if we just want to perform a test build/install to a -# temporary location and write a build report to $out. -if test -z "$prefix"; then - prefix="$out"; -fi - -if test "$useTempPrefix" = "1"; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; -fi - - -# Execute the post-hook. -if test -n "@postHook@"; then - source @postHook@ -fi - -PATH=$_PATH${_PATH:+:}$PATH -if test "$NIX_DEBUG" = "1"; then - echo "Final path: $PATH" -fi - -stripDirs() { - local dirs="$1" - local stripFlags="$2" - local dirsNew= - - for d in ${dirs}; do - if test -d "$prefix/$d"; then - dirsNew="${dirsNew} $prefix/$d " - fi - done - dirs=${dirsNew} - - if test -n "${dirs}"; then - echo $dirs - find $dirs -type f -print0 | xargs -0 strip $stripFlags || true - fi -} - -###################################################################### -# Textual substitution functions. - - -# Some disgusting hackery to escape replacements in Sed substitutions. -# We should really have a tool that replaces literal values by other -# literal values, without any need for escaping. -escapeSed() { - local s="$1" - # The `tr' hack is to escape newlines. Sed handles newlines very - # badly, so we just replace newlines with the magic character 0xff - # (377 octal). So don't use that character in replacements :-P - echo -n "$1" | tr '\012' '\377' | sed -e 's^\\^\\\\^g' -e 's^\xff^\\n^g' -e 's/\^/\\^/g' -e 's/&/\\&/g' -} - - -substitute() { - local input="$1" - local output="$2" - - local -a params=("$@") - - local sedScript=$NIX_BUILD_TOP/.sedargs - rm -f $sedScript - touch $sedScript - - local n p pattern replacement varName - - for ((n = 2; n < ${#params[*]}; n += 1)); do - p=${params[$n]} - - if test "$p" = "--replace"; then - pattern="${params[$((n + 1))]}" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - if test "$p" = "--subst-var"; then - varName="${params[$((n + 1))]}" - pattern="@$varName@" - replacement="${!varName}" - n=$((n + 1)) - fi - - if test "$p" = "--subst-var-by"; then - pattern="@${params[$((n + 1))]}@" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - replacement="$(escapeSed "$replacement")" - - echo "s^$pattern^$replacement^g" >> $sedScript - done - - sed -f $sedScript < "$input" > "$output".tmp - if test -x "$output"; then - chmod +x "$output".tmp - fi - mv -f "$output".tmp "$output" -} - - -substituteInPlace() { - local fileName="$1" - shift - substitute "$fileName" "$fileName" "$@" -} - - -substituteAll() { - local input="$1" - local output="$2" - - # Select all environment variables that start with a lowercase character. - for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do - if test "$NIX_DEBUG" = "1"; then - echo "$envVar -> ${!envVar}" - fi - args="$args --subst-var $envVar" - done - - substitute "$input" "$output" $args -} - - -###################################################################### -# What follows is the generic builder. - - -nestingLevel=0 - -startNest() { - nestingLevel=$(($nestingLevel + 1)) - echo -en "\e[$1p" -} - -stopNest() { - nestingLevel=$(($nestingLevel - 1)) - echo -en "\e[q" -} - -header() { - startNest "$2" - echo "$1" -} - -# Make sure that even when we exit abnormally, the original nesting -# level is properly restored. -closeNest() { - while test $nestingLevel -gt 0; do - stopNest - done -} - -trap "closeNest" EXIT - - -# This function is useful for debugging broken Nix builds. It dumps -# all environment variables to a file `env-vars' in the build -# directory. If the build fails and the `-K' option is used, you can -# then go to the build directory and source in `env-vars' to reproduce -# the environment used for building. -dumpVars() { - if test "$noDumpEnvVars" != "1"; then - export > $NIX_BUILD_TOP/env-vars - fi -} - - -# Redirect stdout/stderr to a named pipe connected to a `tee' process -# that writes the specified file (and also to our original stdout). -# The original stdout is saved in descriptor 3. -startLog() { - local logFile=${logNr}_$1 - logNr=$((logNr + 1)) - if test "$logPhases" = 1; then - ensureDir $logDir - - exec 3>&1 - - if test "$dontLogThroughTee" != 1; then - # This required named pipes (fifos). - logFifo=$NIX_BUILD_TOP/log_fifo - test -p $logFifo || mkfifo $logFifo - startLogWrite "$logDir/$logFile" "$logFifo" - exec > $logFifo 2>&1 - else - exec > $logDir/$logFile 2>&1 - fi - fi -} - -# Factored into a separate function so that it can be overriden. -startLogWrite() { - tee "$1" < "$2" & - logWriterPid=$! -} - - -if test -z "$logDir"; then - logDir=$out/log -fi - -logNr=0 - -# Restore the original stdout/stderr. -stopLog() { - if test "$logPhases" = 1; then - exec >&3 2>&1 - - # Wait until the tee process has died. Otherwise output from - # different phases may be mixed up. - if test -n "$logWriterPid"; then - wait $logWriterPid - logWriterPid= - rm $logFifo - fi - fi -} - - -# Utility function: return the base name of the given path, with the -# prefix `HASH-' removed, if present. -stripHash() { - strippedName=$(basename $1); - if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then - strippedName=$(echo "$strippedName" | cut -c34-) - fi -} - - -unpackFile() { - local file=$1 - local cmd - - header "unpacking source archive $file" 3 - - case $file in - *.tar) - tar xvf $file || fail - ;; - *.tar.gz | *.tgz | *.tar.Z) - gunzip < $file | tar xvf - || fail - ;; - *.tar.bz2 | *.tbz2) - bunzip2 < $file | tar xvf - || fail - ;; - *.zip) - unzip $file || fail - ;; - *) - if test -d "$file"; then - stripHash $file - cp -prvd $file $strippedName || fail - else - if test -n "$findUnpacker"; then - $findUnpacker $1; - fi - if test -z "$unpackCmd"; then - echo "source archive $file has unknown type" - exit 1 - fi - eval "$unpackCmd" || fail - fi - ;; - esac - - stopNest -} - - -unpackW() { - if test -n "$unpackPhase"; then - eval "$unpackPhase" - return - fi - - if test -z "$srcs"; then - if test -z "$src"; then - echo 'variable $src or $srcs should point to the source' - exit 1 - fi - srcs="$src" - fi - - # To determine the source directory created by unpacking the - # source archives, we record the contents of the current - # directory, then look below which directory got added. Yeah, - # it's rather hacky. - local dirsBefore="" - for i in *; do - if test -d "$i"; then - dirsBefore="$dirsBefore $i " - fi - done - - # Unpack all source archives. - for i in $srcs; do - unpackFile $i - done - - # Find the source directory. - if test -n "$setSourceRoot"; then - eval "$setSourceRoot" - else - sourceRoot= - for i in *; do - if test -d "$i"; then - case $dirsBefore in - *\ $i\ *) - ;; - *) - if test -n "$sourceRoot"; then - echo "unpacker produced multiple directories" - exit 1 - fi - sourceRoot=$i - ;; - esac - fi - done - fi - - if test -z "$sourceRoot"; then - echo "unpacker appears to have produced no directories" - exit 1 - fi - - echo "source root is $sourceRoot" - - # By default, add write permission to the sources. This is often - # necessary when sources have been copied from other store - # locations. - if test "dontMakeSourcesWritable" != 1; then - chmod -R +w $sourceRoot - fi - - eval "$postUnpack" -} - - -unpackPhase() { - sourceRoot=. # don't change to user dir homeless shelter if custom unpackSource does'nt set sourceRoot - header "unpacking sources" - startLog "unpack" - unpackW - stopLog - stopNest - cd $sourceRoot -} - - -patchW() { - if test -n "$patchPhase"; then - eval "$patchPhase" - return - fi - - if test -z "$patchFlags"; then - patchFlags="-p1" - fi - - for i in $patches; do - header "applying patch $i" 3 - local uncompress=cat - case $i in - *.gz) - uncompress=gunzip - ;; - *.bz2) - uncompress=bunzip2 - ;; - esac - $uncompress < $i | patch $patchFlags || fail - stopNest - done -} - - -patchPhase() { - if test -z "$patchPhase" -a -z "$patches"; then return; fi - header "patching sources" - startLog "patch" - patchW - stopLog - stopNest -} - - -fixLibtool() { - sed 's^eval sys_lib_.*search_path=.*^^' < $1 > $1.tmp - mv $1.tmp $1 -} - - -configureW() { - if test -n "$configurePhase"; then - eval "$configurePhase" - return - fi - - eval "$preConfigure" - - if test -z "$configureScript"; then - configureScript=./configure - if ! test -x $configureScript; then - echo "no configure script, doing nothing" - return - fi - fi - - if test -z "$dontFixLibtool"; then - for i in $(find . -name "ltmain.sh"); do - echo "fixing libtool script $i" - fixLibtool $i - done - fi - - if test -z "$dontAddPrefix"; then - configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" - fi - - echo "configure flags: $configureFlags ${configureFlagsArray[@]}" - $configureScript $configureFlags"${configureFlagsArray[@]}" || fail - - eval "$postConfigure" -} - - -configurePhase() { - header "configuring" - startLog "configure" - configureW - stopLog - stopNest -} - - -buildW() { - if test -n "$buildPhase"; then - eval "$buildPhase" - return - fi - - eval "$preBuild" - - echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" - make \ - $makeFlags "${makeFlagsArray[@]}" \ - $buildFlags "${buildFlagsArray[@]}" || fail - - eval "$postBuild" -} - - -buildPhase() { - if test "$dontBuild" = 1; then - return - fi - header "building" - startLog "build" - buildW - stopLog - stopNest -} - - -checkW() { - if test -n "$checkPhase"; then - eval "$checkPhase" - return - fi - - if test -z "$checkTarget"; then - checkTarget="check" - fi - - echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" - make \ - $makeFlags "${makeFlagsArray[@]}" \ - $checkFlags "${checkFlagsArray[@]}" $checkTarget || fail -} - - -checkPhase() { - if test "$doCheck" != 1; then - return - fi - header "checking" - startLog "check" - checkW - stopLog - stopNest -} - - -patchELF() { - # Patch all ELF executables and shared libraries. - header "patching ELF executables and libraries" - find "$prefix" \( \ - \( -type f -a -name "*.so*" \) -o \ - \( -type f -a -perm +0100 \) \ - \) -print -exec patchelf --shrink-rpath {} \; - stopNest -} - - -installW() { - if test -n "$installPhase"; then - eval "$installPhase" - return - fi - - eval "$preInstall" - - ensureDir "$prefix" - - if test -z "$installCommand"; then - if test -z "$installTargets"; then - installTargets=install - fi - echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" - make $installTargets \ - $makeFlags "${makeFlagsArray[@]}" \ - $installFlags "${installFlagsArray[@]}" || fail - else - eval "$installCommand" - fi - - eval "$postInstall" -} - - -installPhase() { - if test "$dontInstall" = 1; then - return - fi - header "installing" - startLog "install" - installW - stopLog - stopNest -} - - -# The fixup phase performs generic, package-independent, Nix-related -# stuff, like running patchelf and setting the -# propagated-build-inputs. It should rarely be overriden. -fixupW() { - if test -n "$fixupPhase"; then - eval "$fixupPhase" - return - fi - - eval "$preFixup" - - forceShare=${forceShare:=man doc info} - if test -n "$forceShare"; then - for d in $forceShare; do - if test -d "$prefix/$d"; then - if test -d "$prefix/share/$d"; then - echo "Both $d/ and share/$d/ exists!" - else - echo Fixing location of $d/ subdirectory - ensureDir $prefix/share - if test -w $prefix/share; then - mv -v $prefix/$d $prefix/share - ln -sv share/$d $prefix - fi - fi - else - echo "No $d/ subdirectory, skipping." - fi - done; - fi - - -# TODO : strip _only_ ELF executables, and return || fail here... - if test -z "$dontStrip"; then - echo "Stripping debuging symbols from files in" - stripDirs "${stripDebugList:-lib}" -S - echo "Stripping all symbols from files in" - stripDirs "${stripAllList:-bin sbin}" -s - fi - - if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then - patchELF "$prefix" - fi - - if test -n "$propagatedBuildInputs"; then - ensureDir "$out/nix-support" - echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" - fi - - if test -n "$setupHook"; then - ensureDir "$out/nix-support" - substituteAll "$setupHook" "$out/nix-support/setup-hook" - fi - - eval "$postFixup" -} - - -fixupPhase() { - if test "$dontFixup" = 1; then - return - fi - header "post-installation fixup" - startLog "fixup" - fixupW - stopLog - stopNest -} - - -distW() { - if test -n "$distPhase"; then - eval "$distPhase" - return - fi - - eval "$preDist" - - if test -z "$distTarget"; then - distTarget="dist" - fi - - echo "dist flags: $distFlags ${distFlagsArray[@]}" - make $distFlags "${distFlagsArray[@]}" $distTarget || fail - - if test "$dontCopyDist" != 1; then - ensureDir "$out/tarballs" - - if test -z "$tarballs"; then - tarballs="*.tar.gz" - fi - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - cp -pvd $tarballs $out/tarballs - fi - - eval "$postDist" -} - - -distPhase() { - if test "$doDist" != 1; then - return - fi - header "creating distribution" - startLog "dist" - distW - stopLog - stopNest -} - - -genericBuild() { - header "building $out" - - if test -n "$buildCommand"; then - eval "$buildCommand" - return - fi - - if test -z "$phases"; then - phases="unpackPhase patchPhase configurePhase buildPhase checkPhase \ - installPhase fixupPhase distPhase"; - fi - - for i in $phases; do - dumpVars - eval "$i" - done - - stopNest -} - - -dumpVars diff --git a/pkgs/stdenv/generic/setup-new.sh b/pkgs/stdenv/generic/setup-new.sh deleted file mode 100644 index 68812e42871..00000000000 --- a/pkgs/stdenv/generic/setup-new.sh +++ /dev/null @@ -1,830 +0,0 @@ -set -e - -test -z $NIX_GCC && NIX_GCC=@gcc@ - - -# Set up the initial path. -PATH= -for i in $NIX_GCC @initialPath@; do - PATH=$PATH${PATH:+:}$i/bin -done - -if test "$NIX_DEBUG" = "1"; then - echo "Initial path: $PATH" -fi - - -# Execute the pre-hook. -export SHELL=@shell@ -if test -z "$shell"; then - export shell=@shell@ -fi -param1=@param1@ -param2=@param2@ -param3=@param3@ -param4=@param4@ -param5=@param5@ -if test -n "@preHook@"; then - source @preHook@ -fi - - -# Check that the pre-hook initialised SHELL. -if test -z "$SHELL"; then echo "SHELL not set"; exit 1; fi - - -# Hack: run gcc's setup hook. -envHooks=() -if test -f $NIX_GCC/nix-support/setup-hook; then - source $NIX_GCC/nix-support/setup-hook -fi - - -# Ensure that the given directories exists. -ensureDir() { - local dir - for dir in "$@"; do - if ! test -x "$dir"; then mkdir -p "$dir"; fi - done -} - - -# Called when some build action fails. If $succeedOnFailure is set, -# create the file `$out/nix-support/failed' to signal failure, and -# exit normally. Otherwise, exit with failure. -fail() { - exitCode=$? - if test "$succeedOnFailure" = 1; then - ensureDir "$out/nix-support" - touch "$out/nix-support/failed" - exit 0 - else - exit $? - fi -} - - -# Allow the caller to augment buildInputs (it's not always possible to -# do this before the call to setup.sh, since the PATH is empty at that -# point; here we have a basic Unix environment). -eval "$addInputsHook" - - -# Recursively find all build inputs. -findInputs() -{ - local pkg=$1 - - case $pkgs in - *\ $pkg\ *) - return 0 - ;; - esac - - pkgs="$pkgs $pkg " - - if test -f $pkg/nix-support/setup-hook; then - source $pkg/nix-support/setup-hook - fi - - if test -f $pkg/nix-support/propagated-build-inputs; then - for i in $(cat $pkg/nix-support/propagated-build-inputs); do - findInputs $i - done - fi -} - -pkgs="" -if test -n "$buildinputs"; then - buildInputs="$buildinputs" # compatibility -fi -for i in $buildInputs $propagatedBuildInputs; do - findInputs $i -done - - -# Set the relevant environment variables to point to the build inputs -# found above. -addToEnv() -{ - local pkg=$1 - - if test "$ignoreFailedInputs" != "1" -a -e $1/nix-support/failed; then - echo "failed input $1" >&2 - fail - fi - - if test -d $1/bin; then - export _PATH=$_PATH${_PATH:+:}$1/bin - fi - - for i in "${envHooks[@]}"; do - $i $pkg - done -} - -for i in $pkgs; do - addToEnv $i -done - - -# Add the output as an rpath. -if test "$NIX_NO_SELF_RPATH" != "1"; then - export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS" -fi - - -# Strip debug information by default. -if test -z "$NIX_STRIP_DEBUG"; then - export NIX_STRIP_DEBUG=1 - export NIX_CFLAGS_STRIP="-g0 -Wl,--strip-debug" -fi - - -# Do we know where the store is? This is required for purity checking. -if test -z "$NIX_STORE"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_STORE variable. Please upgrade." >&2 - exit 1 -fi - - -# We also need to know the root of the build directory for purity checking. -if test -z "$NIX_BUILD_TOP"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_BUILD_TOP variable. Please upgrade." >&2 - exit 1 -fi - - -# Set the TZ (timezone) environment variable, otherwise commands like -# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must -# be set--see zic manual page 2004'). -export TZ=UTC - - -# Set the prefix. This is generally $out, but it can be overriden, -# for instance if we just want to perform a test build/install to a -# temporary location and write a build report to $out. -if test -z "$prefix"; then - prefix="$out"; -fi - -if test "$useTempPrefix" = "1"; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; -fi - - -# Execute the post-hook. -if test -n "@postHook@"; then - source @postHook@ -fi - -PATH=$_PATH${_PATH:+:}$PATH -if test "$NIX_DEBUG" = "1"; then - echo "Final path: $PATH" -fi - - -###################################################################### -# Textual substitution functions. - - -# Some disgusting hackery to escape replacements in Sed substitutions. -# We should really have a tool that replaces literal values by other -# literal values, without any need for escaping. -escapeSed() { - local s="$1" - # The `tr' hack is to escape newlines. Sed handles newlines very - # badly, so we just replace newlines with the magic character 0xff - # (377 octal). So don't use that character in replacements :-P - echo -n "$1" | tr '\012' '\377' | sed -e 's^\\^\\\\^g' -e 's^\xff^\\n^g' -e 's/\^/\\^/g' -e 's/&/\\&/g' -} - - -substitute() { - local input="$1" - local output="$2" - - local -a params=("$@") - - local sedScript=$NIX_BUILD_TOP/.sedargs - rm -f $sedScript - touch $sedScript - - local n p pattern replacement varName - - for ((n = 2; n < ${#params[*]}; n += 1)); do - p=${params[$n]} - - if test "$p" = "--replace"; then - pattern="${params[$((n + 1))]}" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - if test "$p" = "--subst-var"; then - varName="${params[$((n + 1))]}" - pattern="@$varName@" - replacement="${!varName}" - n=$((n + 1)) - fi - - if test "$p" = "--subst-var-by"; then - pattern="@${params[$((n + 1))]}@" - replacement="${params[$((n + 2))]}" - n=$((n + 2)) - fi - - replacement="$(escapeSed "$replacement")" - - echo "s^$pattern^$replacement^g" >> $sedScript - done - - sed -f $sedScript < "$input" > "$output".tmp - if test -x "$output"; then - chmod +x "$output".tmp - fi - mv -f "$output".tmp "$output" -} - - -substituteInPlace() { - local fileName="$1" - shift - substitute "$fileName" "$fileName" "$@" -} - - -substituteAll() { - local input="$1" - local output="$2" - - # Select all environment variables that start with a lowercase character. - for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do - if test "$NIX_DEBUG" = "1"; then - echo "$envVar -> ${!envVar}" - fi - args="$args --subst-var $envVar" - done - - substitute "$input" "$output" $args -} - - -###################################################################### -# What follows is the generic builder. - - -nestingLevel=0 - -startNest() { - nestingLevel=$(($nestingLevel + 1)) - echo -en "\e[$1p" -} - -stopNest() { - nestingLevel=$(($nestingLevel - 1)) - echo -en "\e[q" -} - -header() { - startNest "$2" - echo "$1" -} - -# Make sure that even when we exit abnormally, the original nesting -# level is properly restored. -closeNest() { - while test $nestingLevel -gt 0; do - stopNest - done -} - -trap "closeNest" EXIT - - -# This function is useful for debugging broken Nix builds. It dumps -# all environment variables to a file `env-vars' in the build -# directory. If the build fails and the `-K' option is used, you can -# then go to the build directory and source in `env-vars' to reproduce -# the environment used for building. -dumpVars() { - if test "$noDumpEnvVars" != "1"; then - export > $NIX_BUILD_TOP/env-vars - fi -} - - -# Redirect stdout/stderr to a named pipe connected to a `tee' process -# that writes the specified file (and also to our original stdout). -# The original stdout is saved in descriptor 3. -startLog() { - local logFile=${logNr}_$1 - logNr=$((logNr + 1)) - if test "$logPhases" = 1; then - ensureDir $logDir - - exec 3>&1 - - if test "$dontLogThroughTee" != 1; then - # This required named pipes (fifos). - logFifo=$NIX_BUILD_TOP/log_fifo - test -p $logFifo || mkfifo $logFifo - startLogWrite "$logDir/$logFile" "$logFifo" - exec > $logFifo 2>&1 - else - exec > $logDir/$logFile 2>&1 - fi - fi -} - -# Factored into a separate function so that it can be overriden. -startLogWrite() { - tee "$1" < "$2" & - logWriterPid=$! -} - - -if test -z "$logDir"; then - logDir=$out/log -fi - -logNr=0 - -# Restore the original stdout/stderr. -stopLog() { - if test "$logPhases" = 1; then - exec >&3 2>&1 - - # Wait until the tee process has died. Otherwise output from - # different phases may be mixed up. - if test -n "$logWriterPid"; then - wait $logWriterPid - logWriterPid= - rm $logFifo - fi - fi -} - - -# Utility function: return the base name of the given path, with the -# prefix `HASH-' removed, if present. -stripHash() { - strippedName=$(basename $1); - if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then - strippedName=$(echo "$strippedName" | cut -c34-) - fi -} - - -unpackFile() { - local file=$1 - local cmd - - header "unpacking source archive $file" 3 - - case $file in - *.tar) - tar xvf $file || fail - ;; - *.tar.gz | *.tgz | *.tar.Z) - gunzip < $file | tar xvf - || fail - ;; - *.tar.bz2 | *.tbz2) - bunzip2 < $file | tar xvf - || fail - ;; - *.zip) - unzip $file || fail - ;; - *) - if test -d "$file"; then - stripHash $file - cp -prvd $file $strippedName || fail - else - if test -n "$findUnpacker"; then - $findUnpacker $1; - fi - if test -z "$unpackCmd"; then - echo "source archive $file has unknown type" - exit 1 - fi - eval "$unpackCmd" || fail - fi - ;; - esac - - stopNest -} - - -unpackW() { - if test -n "$unpackPhase"; then - eval "$unpackPhase" - return - fi - - if test -z "$srcs"; then - if test -z "$src"; then - echo 'variable $src or $srcs should point to the source' - exit 1 - fi - srcs="$src" - fi - - # To determine the source directory created by unpacking the - # source archives, we record the contents of the current - # directory, then look below which directory got added. Yeah, - # it's rather hacky. - local dirsBefore="" - for i in *; do - if test -d "$i"; then - dirsBefore="$dirsBefore $i " - fi - done - - # Unpack all source archives. - for i in $srcs; do - unpackFile $i - done - - # Find the source directory. - if test -n "$setSourceRoot"; then - eval "$setSourceRoot" - else - sourceRoot= - for i in *; do - if test -d "$i"; then - case $dirsBefore in - *\ $i\ *) - ;; - *) - if test -n "$sourceRoot"; then - echo "unpacker produced multiple directories" - exit 1 - fi - sourceRoot=$i - ;; - esac - fi - done - fi - - if test -z "$sourceRoot"; then - echo "unpacker appears to have produced no directories" - exit 1 - fi - - echo "source root is $sourceRoot" - - # By default, add write permission to the sources. This is often - # necessary when sources have been copied from other store - # locations. - if test "dontMakeSourcesWritable" != 1; then - chmod -R +w $sourceRoot - fi - - eval "$postUnpack" -} - - -unpackPhase() { - header "unpacking sources" - startLog "unpack" - unpackW - stopLog - stopNest -} - - -patchW() { - if test -n "$patchPhase"; then - eval "$patchPhase" - return - fi - - if test -z "$patchFlags"; then - patchFlags="-p1" - fi - - for i in $patches; do - header "applying patch $i" 3 - local uncompress=cat - case $i in - *.gz) - uncompress=gunzip - ;; - *.bz2) - uncompress=bunzip2 - ;; - esac - $uncompress < $i | patch $patchFlags || fail - stopNest - done -} - - -patchPhase() { - if test -z "$patchPhase" -a -z "$patches"; then return; fi - header "patching sources" - startLog "patch" - patchW - stopLog - stopNest -} - - -fixLibtool() { - sed 's^eval sys_lib_.*search_path=.*^^' < $1 > $1.tmp - mv $1.tmp $1 -} - - -configureW() { - if test -n "$configurePhase"; then - eval "$configurePhase" - return - fi - - eval "$preConfigure" - - if test -z "$configureScript"; then - configureScript=./configure - if ! test -x $configureScript; then - echo "no configure script, doing nothing" - return - fi - fi - - if test -z "$dontFixLibtool"; then - for i in $(find . -name "ltmain.sh"); do - echo "fixing libtool script $i" - fixLibtool $i - done - fi - - if test -z "$dontAddPrefix"; then - configureFlags="--prefix=$prefix $configureFlags" - fi - - echo "configure flags: $configureFlags ${configureFlagsArray[@]}" - $configureScript $configureFlags"${configureFlagsArray[@]}" || fail - - eval "$postConfigure" -} - - -configurePhase() { - header "configuring" - startLog "configure" - configureW - stopLog - stopNest -} - - -buildW() { - if test -n "$buildPhase"; then - eval "$buildPhase" - return - fi - - eval "$preBuild" - - echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" - make \ - $makeFlags "${makeFlagsArray[@]}" \ - $buildFlags "${buildFlagsArray[@]}" || fail - - eval "$postBuild" -} - - -buildPhase() { - if test "$dontBuild" = 1; then - return - fi - header "building" - startLog "build" - buildW - stopLog - stopNest -} - - -checkW() { - if test -n "$checkPhase"; then - eval "$checkPhase" - return - fi - - if test -z "$checkTarget"; then - checkTarget="check" - fi - - echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" - make \ - $makeFlags "${makeFlagsArray[@]}" \ - $checkFlags "${checkFlagsArray[@]}" $checkTarget || fail -} - - -checkPhase() { - if test "$doCheck" != 1; then - return - fi - header "checking" - startLog "check" - checkW - stopLog - stopNest -} - - -patchELF() { - # Patch all ELF executables and shared libraries. - header "patching ELF executables and libraries" - find "$prefix" \( \ - \( -type f -a -name "*.so*" \) -o \ - \( -type f -a -perm +0100 \) \ - \) -print -exec patchelf --shrink-rpath {} \; - stopNest -} - - -installW() { - if test -n "$installPhase"; then - eval "$installPhase" - return - fi - - eval "$preInstall" - - ensureDir "$prefix" - - if test -z "$installCommand"; then - if test -z "$installTargets"; then - installTargets=install - fi - echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" - make $installTargets \ - $makeFlags "${makeFlagsArray[@]}" \ - $installFlags "${installFlagsArray[@]}" || fail - else - eval "$installCommand" - fi - - eval "$postInstall" -} - - -installPhase() { - if test "$dontInstall" = 1; then - return - fi - header "installing" - startLog "install" - installW - stopLog - stopNest -} - - -# The fixup phase performs generic, package-independent, Nix-related -# stuff, like running patchelf and setting the -# propagated-build-inputs. It should rarely be overriden. -fixupW() { - if test -n "$fixupPhase"; then - eval "$fixupPhase" - return - fi - - eval "$preFixup" - -# TODO : strip _only_ ELF executables, and return || fail here... - if test -z "$dontStrip"; then - test -d "$prefix/lib" && stripDebug="$prefix/lib" - - if test -n "$stripDebug"; then - find "$stripDebug" -type f -print0 | - xargs -0 strip --strip-debug --verbose || true - fi - - test -d "$prefix/bin" && stripAll="$prefix/bin" - test -d "$prefix/sbin" && stripAll="${stripAll} $prefix/sbin" - if test -n "$stripAll"; then - find "$prefix/bin" "$prefix/sbin" -type f -print0 | - xargs -0 strip --strip-all --verbose || true - fi - fi - - if test -z "$dontFixupShare"; then - for dir in doc info man; do - if test -d "$prefix/$dir"; then - if test -d "$prefix/share/$dir"; then - echo Both "$prefix/$dir" and "$prefix/share/$dir" exists! - fail - else - echo Fixing location of $dir/ subdirectory - ensureDir "$prefix/share" - mv -v "$prefix/$dir" "$prefix/share" - ln -sv "share/$dir" "$prefix" - fi - fi - done - fi - - if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then - patchELF "$prefix" - fi - - if test -n "$propagatedBuildInputs"; then - ensureDir "$out/nix-support" - echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" - fi - - eval "$postFixup" -} - - -fixupPhase() { - if test "$dontFixup" = 1; then - return - fi - header "post-installation fixup" - startLog "fixup" - fixupW - stopLog - stopNest -} - - -distW() { - if test -n "$distPhase"; then - eval "$distPhase" - return - fi - - eval "$preDist" - - if test -z "$distTarget"; then - distTarget="dist" - fi - - echo "dist flags: $distFlags ${distFlagsArray[@]}" - make $distFlags "${distFlagsArray[@]}" $distTarget || fail - - if test "$dontCopyDist" != 1; then - ensureDir "$out/tarballs" - - if test -z "$tarballs"; then - tarballs="*.tar.gz" - fi - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - cp -pvd $tarballs $out/tarballs - fi - - eval "$postDist" -} - - -distPhase() { - if test "$doDist" != 1; then - return - fi - header "creating distribution" - startLog "dist" - distW - stopLog - stopNest -} - - -genericBuild() { - header "building $out" - - if test -n "$buildCommand"; then - eval "$buildCommand" - return - fi - - unpackPhase - cd $sourceRoot - - if test -z "$phases"; then - phases="patchPhase configurePhase buildPhase checkPhase \ - installPhase fixupPhase distPhase"; - fi - - for i in $phases; do - dumpVars - eval "$i" - done - - stopNest -} - - -dumpVars diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index b6814aa410f..395de988e4c 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1,3 +1,31 @@ +###################################################################### +# Helper functions that might be useful in setup hooks. + + +addToSearchPathWithCustomDelimiter() { + local delimiter=$1 + local varName=$2 + local needDir=$3 + local addDir=${4:-$needDir} + local prefix=$5 + if [ -d $prefix$needDir ]; then + if [ -z ${!varName} ]; then + eval export ${varName}=${prefix}$addDir + else + eval export ${varName}=${!varName}${delimiter}${prefix}$addDir + fi + fi +} + +addToSearchPath() +{ + addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" +} + + +###################################################################### +# Initialisation. + set -e test -z $NIX_GCC && NIX_GCC=@gcc@ @@ -10,12 +38,13 @@ for i in $NIX_GCC @initialPath@; do done if test "$NIX_DEBUG" = "1"; then - echo "Initial path: $PATH" + echo "initial path: $PATH" fi # Execute the pre-hook. export SHELL=@shell@ +PATH_DELIMITER=':' if test -z "$shell"; then export shell=@shell@ fi @@ -24,9 +53,8 @@ param2=@param2@ param3=@param3@ param4=@param4@ param5=@param5@ -if test -n "@preHook@"; then - source @preHook@ -fi +if test -n "@preHook@"; then source @preHook@; fi +eval "$preHook" # Check that the pre-hook initialised SHELL. @@ -39,7 +67,7 @@ if test -f $NIX_GCC/nix-support/setup-hook; then source $NIX_GCC/nix-support/setup-hook fi - + # Ensure that the given directories exists. ensureDir() { local dir @@ -48,6 +76,17 @@ ensureDir() { done } +installBin() { + ensureDir $out/bin + cp "$@" $out/bin +} + +assertEnvExists(){ + if test -z "${!1}"; then + msg=${2:-error: assertion failed: env var $1 is required} + echo $msg >&2; exit 1 + fi +} # Called when some build action fails. If $succeedOnFailure is set, # create the file `$out/nix-support/failed' to signal failure, and @@ -80,13 +119,13 @@ findInputs() return 0 ;; esac - + pkgs="$pkgs $pkg " if test -f $pkg/nix-support/setup-hook; then source $pkg/nix-support/setup-hook fi - + if test -f $pkg/nix-support/propagated-build-inputs; then for i in $(cat $pkg/nix-support/propagated-build-inputs); do findInputs $i @@ -141,20 +180,15 @@ if test -z "$NIX_STRIP_DEBUG"; then fi -# Do we know where the store is? This is required for purity checking. -if test -z "$NIX_STORE"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_STORE variable. Please upgrade." >&2 - exit 1 -fi +assertEnvExists NIX_STORE \ + "Error: you have an old version of Nix that does not set the + NIX_STORE variable. This is required for purity checking. + Please upgrade." - -# We also need to know the root of the build directory for purity checking. -if test -z "$NIX_BUILD_TOP"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_BUILD_TOP variable. Please upgrade." >&2 - exit 1 -fi +assertEnvExists NIX_BUILD_TOP \ + "Error: you have an old version of Nix that does not set the + NIX_BUILD_TOP variable. This is required for purity checking. + Please upgrade." # Set the TZ (timezone) environment variable, otherwise commands like @@ -175,17 +209,35 @@ if test "$useTempPrefix" = "1"; then fi -# Execute the post-hook. -if test -n "@postHook@"; then - source @postHook@ -fi - PATH=$_PATH${_PATH:+:}$PATH if test "$NIX_DEBUG" = "1"; then - echo "Final path: $PATH" + echo "final path: $PATH" fi +###################################################################### +# Misc. helper functions. + + +stripDirs() { + local dirs="$1" + local stripFlags="$2" + local dirsNew= + + for d in ${dirs}; do + if test -d "$prefix/$d"; then + dirsNew="${dirsNew} $prefix/$d " + fi + done + dirs=${dirsNew} + + if test -n "${dirs}"; then + echo $dirs + find $dirs -type f -print0 | xargs -0 strip $stripFlags || true + fi +} + + ###################################################################### # Textual substitution functions. @@ -195,40 +247,44 @@ substitute() { local output="$2" local -a params=("$@") + local -a args=() local sedScript=$NIX_BUILD_TOP/.sedargs rm -f $sedScript touch $sedScript local n p pattern replacement varName - + for ((n = 2; n < ${#params[*]}; n += 1)); do p=${params[$n]} if test "$p" = "--replace"; then - pattern=${params[$((n + 1))]} - replacement=${params[$((n + 2))]} + pattern="${params[$((n + 1))]}" + replacement="${params[$((n + 2))]}" n=$((n + 2)) - echo "s^$pattern^$replacement^g" >> $sedScript - sedArgs=("${sedArgs[@]}" "-e" ) fi if test "$p" = "--subst-var"; then - varName=${params[$((n + 1))]} + varName="${params[$((n + 1))]}" + pattern="@$varName@" + replacement="${!varName}" n=$((n + 1)) - echo "s^@${varName}@^${!varName}^g" >> $sedScript fi if test "$p" = "--subst-var-by"; then - varName=${params[$((n + 1))]} - replacement=${params[$((n + 2))]} + pattern="@${params[$((n + 1))]}@" + replacement="${params[$((n + 2))]}" n=$((n + 2)) - echo "s^@${varName}@^$replacement^g" >> $sedScript fi + if test ${#args[@]} != 0; then + args[${#args[@]}]="-a" + fi + args[${#args[@]}]="$pattern" + args[${#args[@]}]="$replacement" done - sed -f $sedScript < "$input" > "$output".tmp + replace-literal -e -s "${args[@]}" < "$input" > "$output".tmp if test -x "$output"; then chmod +x "$output".tmp fi @@ -246,7 +302,7 @@ substituteInPlace() { substituteAll() { local input="$1" local output="$2" - + # Select all environment variables that start with a lowercase character. for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do if test "$NIX_DEBUG" = "1"; then @@ -256,7 +312,7 @@ substituteAll() { done substitute "$input" "$output" $args -} +} ###################################################################### @@ -366,20 +422,20 @@ stripHash() { unpackFile() { - local file=$1 + local file="$1" local cmd header "unpacking source archive $file" 3 - case $file in + case "$file" in *.tar) tar xvf $file || fail ;; *.tar.gz | *.tgz | *.tar.Z) - gunzip < $file | tar xvf - || fail + gzip -d < $file | tar xvf - || fail ;; *.tar.bz2 | *.tbz2) - bunzip2 < $file | tar xvf - || fail + bzip2 -d < $file | tar xvf - || fail ;; *.zip) unzip $file || fail @@ -405,7 +461,7 @@ unpackFile() { } -unpackW() { +unpackPhase() { if test -n "$unpackPhase"; then eval "$unpackPhase" return @@ -475,21 +531,14 @@ unpackW() { } -unpackPhase() { - header "unpacking sources" - startLog "unpack" - unpackW - stopLog - stopNest -} - - -patchW() { +patchPhase() { if test -n "$patchPhase"; then eval "$patchPhase" return fi + if test -z "$patchPhase" -a -z "$patches"; then return; fi + if test -z "$patchFlags"; then patchFlags="-p1" fi @@ -499,10 +548,10 @@ patchW() { local uncompress=cat case $i in *.gz) - uncompress=gunzip + uncompress="gzip -d" ;; *.bz2) - uncompress=bunzip2 + uncompress="bzip2 -d" ;; esac $uncompress < $i | patch $patchFlags || fail @@ -511,23 +560,13 @@ patchW() { } -patchPhase() { - if test -z "$patchPhase" -a -z "$patches"; then return; fi - header "patching sources" - startLog "patch" - patchW - stopLog - stopNest -} - - fixLibtool() { sed 's^eval sys_lib_.*search_path=.*^^' < $1 > $1.tmp mv $1.tmp $1 } -configureW() { +configurePhase() { if test -n "$configurePhase"; then eval "$configurePhase" return @@ -551,7 +590,14 @@ configureW() { fi if test -z "$dontAddPrefix"; then - configureFlags="--prefix=$prefix $configureFlags" + configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" + fi + + # Add --disable-dependency-tracking to speed up some builds. + if test -z "$dontAddDisableDepTrack"; then + if grep -q dependency-tracking $configureScript; then + configureFlags="--disable-dependency-tracking ${prefixKey:---prefix=}$prefix $configureFlags" + fi fi echo "configure flags: $configureFlags ${configureFlagsArray[@]}" @@ -561,25 +607,21 @@ configureW() { } -configurePhase() { - header "configuring" - startLog "configure" - configureW - stopLog - stopNest -} - - -buildW() { +buildPhase() { if test -n "$buildPhase"; then eval "$buildPhase" return fi eval "$preBuild" - + + if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then + echo "no Makefile, doing nothing" + return + fi + echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" - make \ + make ${makefile:+-f $makefile} \ $makeFlags "${makeFlagsArray[@]}" \ $buildFlags "${buildFlagsArray[@]}" || fail @@ -587,19 +629,7 @@ buildW() { } -buildPhase() { - if test "$dontBuild" = 1; then - return - fi - header "building" - startLog "build" - buildW - stopLog - stopNest -} - - -checkW() { +checkPhase() { if test -n "$checkPhase"; then eval "$checkPhase" return @@ -610,24 +640,12 @@ checkW() { fi echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" - make \ + make ${makefile:+-f $makefile} \ $makeFlags "${makeFlagsArray[@]}" \ $checkFlags "${checkFlagsArray[@]}" $checkTarget || fail } -checkPhase() { - if test "$doCheck" != 1; then - return - fi - header "checking" - startLog "check" - checkW - stopLog - stopNest -} - - patchELF() { # Patch all ELF executables and shared libraries. header "patching ELF executables and libraries" @@ -639,7 +657,7 @@ patchELF() { } -installW() { +installPhase() { if test -n "$installPhase"; then eval "$installPhase" return @@ -654,7 +672,7 @@ installW() { installTargets=install fi echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" - make $installTargets \ + make ${makefile:+-f $makefile} $installTargets \ $makeFlags "${makeFlagsArray[@]}" \ $installFlags "${installFlagsArray[@]}" || fail else @@ -665,22 +683,10 @@ installW() { } -installPhase() { - if test "$dontInstall" = 1; then - return - fi - header "installing" - startLog "install" - installW - stopLog - stopNest -} - - # The fixup phase performs generic, package-independent, Nix-related # stuff, like running patchelf and setting the # propagated-build-inputs. It should rarely be overriden. -fixupW() { +fixupPhase() { if test -n "$fixupPhase"; then eval "$fixupPhase" return @@ -688,9 +694,33 @@ fixupW() { eval "$preFixup" - if test -z "$dontStrip" -a "$NIX_STRIP_DEBUG" = 1; then - find "$prefix" -name "*.a" -exec echo stripping {} \; \ - -exec strip -S {} \; || fail + # Put man/doc/info under $out/share. + forceShare=${forceShare:=man doc info} + if test -n "$forceShare"; then + for d in $forceShare; do + if test -d "$prefix/$d"; then + if test -d "$prefix/share/$d"; then + echo "both $d/ and share/$d/ exists!" + else + echo "fixing location of $d/ subdirectory" + ensureDir $prefix/share + if test -w $prefix/share; then + mv -v $prefix/$d $prefix/share + ln -sv share/$d $prefix + fi + fi + fi + done; + fi + + # TODO: strip _only_ ELF executables, and return || fail here... + if test -z "$dontStrip"; then + stripDebugList=${stripDebugList:-lib} + echo "stripping debuging symbols from files in $stripDebugList" + stripDirs "$stripDebugList" -S + stripAllList=${stripAllList:-bin sbin} + echo "stripping all symbols from files in $stripAllList" + stripDirs "$stripAllList" -s fi if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then @@ -702,36 +732,29 @@ fixupW() { echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" fi + if test -n "$setupHook"; then + ensureDir "$out/nix-support" + substituteAll "$setupHook" "$out/nix-support/setup-hook" + fi + eval "$postFixup" } -fixupPhase() { - if test "$dontFixup" = 1; then - return - fi - header "post-installation fixup" - startLog "fixup" - fixupW - stopLog - stopNest -} - - -distW() { +distPhase() { if test -n "$distPhase"; then eval "$distPhase" return fi eval "$preDist" - + if test -z "$distTarget"; then distTarget="dist" fi echo "dist flags: $distFlags ${distFlagsArray[@]}" - make $distFlags "${distFlagsArray[@]}" $distTarget || fail + make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" $distTarget || fail if test "$dontCopyDist" != 1; then ensureDir "$out/tarballs" @@ -749,15 +772,18 @@ distW() { } -distPhase() { - if test "$doDist" != 1; then - return - fi - header "creating distribution" - startLog "dist" - distW - stopLog - stopNest +showPhaseHeader() { + local phase="$1" + case $phase in + unpackPhase) header "unpacking sources";; + patchPhase) header "patching sources";; + configurePhase) header "configuring";; + buildPhase) header "building";; + checkPhase) header "running tests";; + installPhase) header "installing";; + fixupPhase) header "post-installation fixup";; + *) header "$phase";; + esac } @@ -769,21 +795,41 @@ genericBuild() { return fi - unpackPhase - cd $sourceRoot - if test -z "$phases"; then - phases="patchPhase configurePhase buildPhase checkPhase \ - installPhase fixupPhase distPhase"; + phases="unpackPhase patchPhase configurePhase buildPhase checkPhase \ + installPhase fixupPhase distPhase $extraPhases"; fi - for i in $phases; do + for curPhase in $phases; do + if test "$curPhase" = buildPhase -a -n "$dontBuild"; then continue; fi + if test "$curPhase" = checkPhase -a -z "$doCheck"; then continue; fi + if test "$curPhase" = installPhase -a -n "$dontInstall"; then continue; fi + if test "$curPhase" = fixupPhase -a -n "$dontFixup"; then continue; fi + if test "$curPhase" = distPhase -a -z "$doDist"; then continue; fi + + showPhaseHeader "$curPhase" + startLog "$curPhase" dumpVars - eval "$i" + + # Evaluate the variable named $curPhase if it exists, otherwise the + # function named $curPhase. + eval "${!curPhase:-$curPhase}" + + if test "$curPhase" = unpackPhase; then + cd "${sourceRoot:-.}" + fi + + stopLog + stopNest done - + stopNest } +# Execute the post-hook. +if test -n "@postHook@"; then source @postHook@; fi +eval "$postHook" + + dumpVars diff --git a/pkgs/stdenv/linux/bootstrap/i686/bunzip2 b/pkgs/stdenv/linux/bootstrap/i686/bunzip2 deleted file mode 100755 index 3f3f810e77e..00000000000 Binary files a/pkgs/stdenv/linux/bootstrap/i686/bunzip2 and /dev/null differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/bzip2 b/pkgs/stdenv/linux/bootstrap/i686/bzip2 new file mode 100755 index 00000000000..ea45149fa4d Binary files /dev/null and b/pkgs/stdenv/linux/bootstrap/i686/bzip2 differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/cp b/pkgs/stdenv/linux/bootstrap/i686/cp index 06de68ad9a8..55142a9e0b8 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/cp and b/pkgs/stdenv/linux/bootstrap/i686/cp differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 b/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 index 8db4439e4b8..b7434ff5b9e 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 and b/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/default.nix b/pkgs/stdenv/linux/bootstrap/i686/default.nix index d48cbc9a5c5..db5c581453b 100644 --- a/pkgs/stdenv/linux/bootstrap/i686/default.nix +++ b/pkgs/stdenv/linux/bootstrap/i686/default.nix @@ -1,27 +1,27 @@ { bash = ./bash; - bunzip2 = ./bunzip2; + bzip2 = ./bzip2; cp = ./cp; curl = ./curl.bz2; tar = ./tar.bz2; - staticToolsURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r6881/static-tools.tar.bz2; - sha1 = "c366d9ee0d969e68311fdb37abc91b46fb13b585"; - }; - binutilsURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r6881/binutils.tar.bz2; - sha1 = "fa77c29ef4f13ddf43bba3f4f020ceafa6604ccc"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r9803/binutils.tar.bz2; + sha1 = "73532561c2f98d0df641fbd778bc92cea298762a"; }; gccURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r6881/gcc.tar.bz2; - sha1 = "ea7171fc2f70880e8a6c2480b3d3fed7409b7a4e"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r9803/gcc.tar.bz2; + sha1 = "522dc2e22dc42f640b0290638382d45bd43a7d55"; }; glibcURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r6881/glibc.tar.bz2; - sha1 = "728e0a9e66e01cf2815eca8cc638e5ed140a36cd"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r9803/glibc.tar.bz2; + sha1 = "b9ae1e43e9977476ef53f8c1c9cd1cff5526ff40"; + }; + + staticToolsURL = { + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/i686/r9803/static-tools.tar.bz2; + sha1 = "ebe826e848736a82bcdd9a195dd510b533ecc997"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/i686/tar.bz2 b/pkgs/stdenv/linux/bootstrap/i686/tar.bz2 index 189bcce24eb..b6241bf3d23 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/tar.bz2 and b/pkgs/stdenv/linux/bootstrap/i686/tar.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/bunzip2 b/pkgs/stdenv/linux/bootstrap/powerpc/bunzip2 deleted file mode 100755 index 730214a404b..00000000000 Binary files a/pkgs/stdenv/linux/bootstrap/powerpc/bunzip2 and /dev/null differ diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 b/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 new file mode 100755 index 00000000000..a9eb626e1ca Binary files /dev/null and b/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 differ diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/cp b/pkgs/stdenv/linux/bootstrap/powerpc/cp index 4477d7eb6e0..972a653851c 100755 Binary files a/pkgs/stdenv/linux/bootstrap/powerpc/cp and b/pkgs/stdenv/linux/bootstrap/powerpc/cp differ diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 b/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 index 90f0fa69ab2..4f0d64341e8 100755 Binary files a/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 and b/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/default.nix b/pkgs/stdenv/linux/bootstrap/powerpc/default.nix index 1cb29ee4a62..a354cc01d85 100644 --- a/pkgs/stdenv/linux/bootstrap/powerpc/default.nix +++ b/pkgs/stdenv/linux/bootstrap/powerpc/default.nix @@ -1,27 +1,27 @@ { bash = ./bash; - bunzip2 = ./bunzip2; + bzip2 = ./bzip2; cp = ./cp; curl = ./curl.bz2; tar = ./tar.bz2; staticToolsURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r6888/static-tools.tar.bz2; - sha1 = "82acee6c1a895f3a45fdbf921d49be6c996abc5b"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r9828/static-tools.tar.bz2; + sha1 = "e4d1680e3dfa752e49a996a31140db53b10061cb"; }; binutilsURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r6888/binutils.tar.bz2; - sha1 = "bc4f9fc931b0d139d0b16e548b1605d5181c74c0"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r9828/binutils.tar.bz2; + sha1 = "2609f4d9277a60fcd178395d3d49911190e08f36"; }; gccURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r6888/gcc.tar.bz2; - sha1 = "ade3225a3135b0e3415cc8cb9e1bec61a742e200"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r9828/gcc.tar.bz2; + sha1 = "71d79d736bfef6252208fe6239e528a591becbed"; }; glibcURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r6888/glibc.tar.bz2; - sha1 = "e28476443e02b9c2e7881ced27c23cb039421cda"; + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/powerpc/r9828/glibc.tar.bz2; + sha1 = "bf0245e16235800c8aa9c6a5de6565583a66e46d"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 b/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 index 999bca557e2..c014e9cc044 100755 Binary files a/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 and b/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/bunzip2 b/pkgs/stdenv/linux/bootstrap/x86_64/bunzip2 deleted file mode 100755 index 9ca924e2bc4..00000000000 Binary files a/pkgs/stdenv/linux/bootstrap/x86_64/bunzip2 and /dev/null differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/bzip2 b/pkgs/stdenv/linux/bootstrap/x86_64/bzip2 new file mode 100755 index 00000000000..dd2cce8952c Binary files /dev/null and b/pkgs/stdenv/linux/bootstrap/x86_64/bzip2 differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/cp b/pkgs/stdenv/linux/bootstrap/x86_64/cp index b563278f9a6..397b1e89809 100755 Binary files a/pkgs/stdenv/linux/bootstrap/x86_64/cp and b/pkgs/stdenv/linux/bootstrap/x86_64/cp differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/curl.bz2 b/pkgs/stdenv/linux/bootstrap/x86_64/curl.bz2 index a4051323193..8e40942bcfe 100755 Binary files a/pkgs/stdenv/linux/bootstrap/x86_64/curl.bz2 and b/pkgs/stdenv/linux/bootstrap/x86_64/curl.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/default.nix b/pkgs/stdenv/linux/bootstrap/x86_64/default.nix index f43fa42682b..0608fc4002e 100644 --- a/pkgs/stdenv/linux/bootstrap/x86_64/default.nix +++ b/pkgs/stdenv/linux/bootstrap/x86_64/default.nix @@ -1,27 +1,27 @@ { bash = ./bash; - bunzip2 = ./bunzip2; + bzip2 = ./bzip2; cp = ./cp; curl = ./curl.bz2; tar = ./tar.bz2; - staticToolsURL = { - url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/x86_64/r6905/static-tools.tar.bz2; - sha1 = "5467de09c91f0a9bf511a9d476547e10b9f067fb"; - }; - binutilsURL = { url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/x86_64/r6905/binutils.tar.bz2; - sha1 = "739623c8be225224ed57a76c5f483d5e373fdae8"; + sha1 = "9ac95e34c96c19cd0b925af46c97c9979becaaca"; }; gccURL = { url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/x86_64/r6905/gcc.tar.bz2; - sha1 = "b4bb2b2863d7b368c7c32e789d6877e5b5a97637"; + sha1 = "e8cb32425c8f55833ca081bd74668a029bdf1755"; }; glibcURL = { url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/x86_64/r6905/glibc.tar.bz2; - sha1 = "f0a5e1a224931f59267975a51d4e9c20e6cb3ae8"; + sha1 = "74b1698a4595ce4b4f43a33b3ceca1e4459e494e"; + }; + + staticToolsURL = { + url = http://nix.cs.uu.nl/dist/tarballs/stdenv-linux/x86_64/r6905/static-tools.tar.bz2; + sha1 = "4da3af92c9bcd8fc43b31934d8429412e209741b"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/tar.bz2 b/pkgs/stdenv/linux/bootstrap/x86_64/tar.bz2 index c28307335dd..94b2bacdb9d 100755 Binary files a/pkgs/stdenv/linux/bootstrap/x86_64/tar.bz2 and b/pkgs/stdenv/linux/bootstrap/x86_64/tar.bz2 differ diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index f926469a403..6a183457f08 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -27,7 +27,7 @@ rec { inherit system; name = "curl"; builder = bootstrapTools.bash; - inherit (bootstrapTools) bunzip2 cp curl; + inherit (bootstrapTools) bzip2 cp curl; args = [ ./scripts/unpack-curl.sh ]; }; @@ -45,7 +45,7 @@ rec { downloadAndUnpack = pkgname: {url, sha1}: derivation { name = pkgname; builder = bootstrapTools.bash; - inherit (bootstrapTools) bunzip2 tar cp; + inherit (bootstrapTools) bzip2 tar cp; args = [ ./scripts/unpack.sh ]; tarball = download {inherit url sha1 pkgname;}; inherit system; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index db7c3d72e11..6358855464b 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -1,6 +1,8 @@ +{system ? builtins.currentSystem}: + let - pkgs = import ../../top-level/all-packages.nix {}; + pkgs = import ../../top-level/all-packages.nix {inherit system;}; # Have to do removeAttrs to prevent all-packages from copying @@ -37,22 +39,23 @@ let gnutar = # Tar seems to be broken on dietlibc on x86_64. - if pkgs.stdenv.system != "x86_64-linux" + if system != "x86_64-linux" then pkgsDiet.gnutar151 # 1.16 is broken else pkgsStatic.gnutar; gawk = # Dietlibc only provides sufficient math functions (fmod, sin, # cos, etc.) on i686. On other platforms, use Glibc. - if pkgs.stdenv.system == "i686-linux" + if system == "i686-linux" then pkgsDiet.gawk else pkgsStatic.gawk; - gcc = import ../../development/compilers/gcc-4.1 { + gcc = import ../../development/compilers/gcc-4.2 { inherit (pkgs) fetchurl stdenv; noSysDirs = true; langCC = false; staticCompiler = true; + profiledCompiler = true; }; curl = pkgsDiet.realCurl; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.sh b/pkgs/stdenv/linux/make-bootstrap-tools.sh index 49bb5afe477..cadc2129b31 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/make-bootstrap-tools.sh @@ -24,7 +24,7 @@ nukeRefs() { # necessary for the absolute first stage of the bootstrap. cp $bash/bin/bash $out/in-nixpkgs nukeRefs $out/in-nixpkgs/bash -cp $bzip2/bin/bunzip2 $out/in-nixpkgs +cp $bzip2/bin/bzip2 $out/in-nixpkgs cp $coreutils/bin/cp $out/in-nixpkgs cp $gnutar/bin/tar $out/in-nixpkgs nukeRefs $out/in-nixpkgs/tar @@ -51,8 +51,7 @@ cp $gawk/bin/gawk tools/bin ln -s gawk tools/bin/awk cp $gnutar/bin/* tools/bin cp $gzip/bin/gzip tools/bin -ln -s gzip tools/bin/gunzip -cp $bzip2/bin/bunzip2 tools/bin +cp $bzip2/bin/bzip2 tools/bin cp $gnumake/bin/* tools/bin cp $patch/bin/* tools/bin cp $patchelf/bin/* tools/bin @@ -62,6 +61,8 @@ nukeRefs tools/bin/sed nukeRefs tools/bin/gawk nukeRefs tools/bin/tar nukeRefs tools/bin/grep +nukeRefs tools/bin/fgrep +nukeRefs tools/bin/egrep nukeRefs tools/bin/patchelf nukeRefs tools/bin/make @@ -87,7 +88,6 @@ cp -prd $gcc/libexec gcc chmod -R +w gcc nukeRefs gcc/libexec/gcc/*/*/cc1 nukeRefs gcc/libexec/gcc/*/*/collect2 -rm -f gcc/lib/libmud* gcc/lib/libiberty* gcc/lib/libssp* if test -e gcc/lib/libgcc_s.so.1; then nukeRefs gcc/lib/libgcc_s.so.1 fi @@ -96,11 +96,15 @@ if test -e $gcc/lib64; then chmod -R +w gcc/lib64 nukeRefs gcc/lib64/libgcc_s.so.1 fi +rm -f gcc/lib*/libmud* gcc/lib*/libiberty* gcc/lib*/libssp* gcc/lib*/libgomp* rm -rf gcc/lib/gcc/*/*/install-tools rm -rf gcc/lib/gcc/*/*/include/root rm -rf gcc/lib/gcc/*/*/include/linux -if test -e gcc/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/bits/mathdef.h; then - nukeRefs gcc/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/bits/mathdef.h +if test "$system" = "powerpc-linux"; then + nukeRefs gcc/lib/gcc/powerpc-unknown-linux-gnu/*/include/bits/mathdef.h + # Dangling symlink "sound", probably produced by fixinclude. + # Should investigate why it's there in the first place. + rm -f gcc/lib/gcc/powerpc-unknown-linux-gnu/*/include/sound fi @@ -116,12 +120,20 @@ chmod -R +w glibc rm glibc/include/linux cp -prd $(readlink $glibc/include/linux) glibc/include rm glibc/include/asm -ln -s $(readlink $(readlink $glibc/include/asm)) glibc/include/asm +if test -L "$(readlink $glibc/include/asm)"; then + ln -s $(readlink $(readlink $glibc/include/asm)) glibc/include/asm +else + cp -prd "$(readlink $glibc/include/asm)" glibc/include +fi for i in glibc/include/asm-*; do target=$(readlink $i) rm $i cp -prd $target glibc/include done +if test "$system" = "powerpc-linux"; then + # Hopefully we won't need these. + rm -f glibc/include/mtd glibc/include/rdma glibc/include/sound glibc/include/video +fi # Strip executables even further. diff --git a/pkgs/stdenv/linux/scripts/unpack-curl.sh b/pkgs/stdenv/linux/scripts/unpack-curl.sh index 147edcebe04..3023f865c94 100644 --- a/pkgs/stdenv/linux/scripts/unpack-curl.sh +++ b/pkgs/stdenv/linux/scripts/unpack-curl.sh @@ -7,5 +7,5 @@ $cp -prvd . $out $cp -prvd . $out/bin $cp $curl curl.bz2 -$bunzip2 -d curl.bz2 +$bzip2 -d curl.bz2 $cp curl $out/bin diff --git a/pkgs/stdenv/linux/scripts/unpack.sh b/pkgs/stdenv/linux/scripts/unpack.sh index ef3eaf6349c..eb916cbc48d 100644 --- a/pkgs/stdenv/linux/scripts/unpack.sh +++ b/pkgs/stdenv/linux/scripts/unpack.sh @@ -1,8 +1,8 @@ set -e $cp $tar .tar.bz2 -$bunzip2 .tar.bz2 +$bzip2 -d .tar.bz2 -$bunzip2 -d < $tarball | ./.tar xvf - +$bzip2 -d < $tarball | ./.tar xvf - $cp -prd * $out diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix index 225bc557350..cb9ee9e7f06 100644 --- a/pkgs/tools/archivers/cpio/default.nix +++ b/pkgs/tools/archivers/cpio/default.nix @@ -1,10 +1,9 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "cpio-2.7"; + name = "cpio-2.9"; src = fetchurl { - url = http://ftp.gnu.org/gnu/cpio/cpio-2.7.tar.bz2; - md5 = "69ad6cb3d288aafe5f969f68d9fd0fb7"; + url = mirror://gnu/cpio/cpio-2.9.tar.bz2; + sha256 = "01s7f9hg8kgpis96j99hgkiqgdy53pm7qi7bhm3fzx58jfk5z6mv"; }; - patches = [./symlink.patch ./gnulib-futimens.patch]; } diff --git a/pkgs/tools/archivers/cpio/gnulib-futimens.patch b/pkgs/tools/archivers/cpio/gnulib-futimens.patch deleted file mode 100644 index 11703d5706d..00000000000 --- a/pkgs/tools/archivers/cpio/gnulib-futimens.patch +++ /dev/null @@ -1,30 +0,0 @@ -now hat glibc-2.6 declares futimens. -http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00089.html - -diff -ru cpio-2.7.orig/lib/utimens.c cpio-2.7/lib/utimens.c ---- cpio-2.7.orig/lib/utimens.c 2007-05-20 21:23:57.000000000 +0900 -+++ cpio-2.7/lib/utimens.c 2007-05-21 08:40:22.000000000 +0900 -@@ -73,7 +73,7 @@ - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -+gl_futimens (int fd ATTRIBUTE_UNUSED, - char const *file, struct timespec const timespec[2]) - { - /* There's currently no interface to set file timestamps with -@@ -166,5 +166,5 @@ - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return gl_futimens (-1, file, timespec); - } -diff -ru cpio-2.7.orig/lib/utimens.h cpio-2.7/lib/utimens.h ---- cpio-2.7.orig/lib/utimens.h 2007-05-20 21:23:57.000000000 +0900 -+++ cpio-2.7/lib/utimens.h 2007-05-21 08:39:57.000000000 +0900 -@@ -1,3 +1,3 @@ - #include "timespec.h" --int futimens (int, char const *, struct timespec const [2]); -+int gl_futimens (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); diff --git a/pkgs/tools/archivers/cpio/symlink.patch b/pkgs/tools/archivers/cpio/symlink.patch deleted file mode 100644 index 89f82daa522..00000000000 --- a/pkgs/tools/archivers/cpio/symlink.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://lists.gnu.org/archive/html/bug-cpio/2006-11/msg00003.html - -diff -Ndpru cpio-2.7/src/copyout.c cpio-2.7.fixed/src/copyout.c ---- cpio-2.7/src/copyout.c 2006-09-27 02:19:44.000000000 -0600 -+++ cpio-2.7.fixed/src/copyout.c 2006-11-12 18:58:25.000000000 -0700 -@@ -806,6 +806,7 @@ process_copy_out () - free (link_name); - continue; - } -+ link_name[link_size] = '\0'; - cpio_safer_name_suffix (link_name, false, - !no_abs_paths_flag, true); - link_size = strlen (link_name); diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index c8d77071123..7242f32f71c 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -1,10 +1,17 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "gnutar-1.16.1"; + name = "gnutar-1.19"; + src = fetchurl { - url = mirror://gnu/tar/tar-1.16.1.tar.bz2; - md5 = "d51593461c5ef1f7e37134f22338bb9e"; + url = mirror://gnu/tar/tar-1.19.tar.bz2; + sha256 = "1d4wh27wlgryz3ld6gp6fn56knh7dmny93bmgixy07kvlxnx9466"; + }; + + patches = [./implausible.patch]; + + meta = { + homepage = http://www.gnu.org/software/grep/; + description = "GNU implementation of the tar archiver"; }; - patches = [./implausible.patch ./gnulib-futimens.patch]; } diff --git a/pkgs/tools/archivers/gnutar/gnulib-futimens.patch b/pkgs/tools/archivers/gnutar/gnulib-futimens.patch deleted file mode 100644 index 00cdf9322e6..00000000000 --- a/pkgs/tools/archivers/gnutar/gnulib-futimens.patch +++ /dev/null @@ -1,42 +0,0 @@ -now hat glibc-2.6 declares futimens. -http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00089.html - -diff -ru cpio-2.7.orig/lib/utimens.c cpio-2.7/lib/utimens.c ---- cpio-2.7.orig/lib/utimens.c 2007-05-20 21:23:57.000000000 +0900 -+++ cpio-2.7/lib/utimens.c 2007-05-21 08:40:22.000000000 +0900 -@@ -73,7 +73,7 @@ - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -+gl_futimens (int fd ATTRIBUTE_UNUSED, - char const *file, struct timespec const timespec[2]) - { - /* There's currently no interface to set file timestamps with -@@ -166,5 +166,5 @@ - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return gl_futimens (-1, file, timespec); - } -diff -ru cpio-2.7.orig/lib/utimens.h cpio-2.7/lib/utimens.h ---- cpio-2.7.orig/lib/utimens.h 2007-05-20 21:23:57.000000000 +0900 -+++ cpio-2.7/lib/utimens.h 2007-05-21 08:39:57.000000000 +0900 -@@ -1,3 +1,3 @@ - #include "timespec.h" --int futimens (int, char const *, struct timespec const [2]); -+int gl_futimens (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); -diff -ur tar-1.16.1.orig/src/misc.c tar-1.16.1/src/misc.c ---- tar-1.16.1.orig/src/misc.c 2007-05-21 08:57:02.000000000 +0900 -+++ tar-1.16.1/src/misc.c 2007-05-21 08:57:16.000000000 +0900 -@@ -518,7 +518,7 @@ - } - #endif - -- return futimens (fd, file, timespec); -+ return gl_futimens (fd, file, timespec); - } - - /* A description of a working directory. */ diff --git a/pkgs/tools/archivers/sharutils/4.6.3.nix b/pkgs/tools/archivers/sharutils/4.6.3.nix new file mode 100644 index 00000000000..830c2a072b6 --- /dev/null +++ b/pkgs/tools/archivers/sharutils/4.6.3.nix @@ -0,0 +1,13 @@ +args: with args; +stdenv.mkDerivation rec { + name = "sharutils-" + version; + + src = fetchurl { + url = "mirror://gnu/sharutils/REL-${version}/${name}.tar.bz2"; + sha256 = "1sirrzas8llcsd8gnh56pns39wa1f803vff1kmy5islfi1p9vqk8"; + }; + + meta = { + homepage = http://www.gnu.org/software/sharutils; + }; +} diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 58d6e8b9707..0a2afd05372 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -2,9 +2,16 @@ stdenv.mkDerivation { name = "gzip-1.3.12"; + src = fetchurl { url = http://ftp.gnu.org/gnu/gzip/gzip-1.3.12.tar.gz; sha256 = "1bw7sm68xjlnlzgcx66hnw80ac1qqyvhw0vw27zilgbzbzh5nmiz"; }; - patches = [./gnulib-futimens.patch]; + + meta = { + homepage = http://www.gzip.org/; + description = "The gzip compression program"; + }; + + patches = [./gnulib-futimens.patch]; } diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 770a1dbfbc9..8292c56f0ea 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -1,10 +1,15 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "coreutils-6.9"; + name = "coreutils-6.10"; + src = fetchurl { - url = mirror://gnu/coreutils/coreutils-6.9.tar.bz2; - sha256 = "1c4p2kiy4m024qcl1przvphy8vhivf8jvclq6bjm1pjps5d8khl9"; + url = mirror://gnu/coreutils/coreutils-6.10.tar.gz; + sha256 = "0zpbxfl16sq45s53fxw43i9i8lrdcc845714c1j5f84zi13ka08x"; + }; + + meta = { + homepage = http://www.gnu.org/software/coreutils/; + description = "The basic file, shell and text manipulation utilities of the GNU operating system"; }; - patches = [ ./gnulib-futimens.patch ] ; } diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 812b0c78e2c..acfbf90d946 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -1,10 +1,10 @@ {stdenv, fetchurl, coreutils}: stdenv.mkDerivation { - name = "findutils-4.2.30"; + name = "findutils-4.2.32"; src = fetchurl { - url = mirror://gnu/findutils/findutils-4.2.30.tar.gz; - sha256 = "1x1s0h1gf4hxh6xi6vq336sz8zsh4hvnsslc7607z41l82xrqjrl"; + url = mirror://gnu/findutils/findutils-4.2.32.tar.gz; + sha256 = "05sj0154kl4mbqg7dcabiaa16snjv2ppfwwhcvl2zyn2yc28igc7"; }; buildInputs = [coreutils]; @@ -12,4 +12,9 @@ stdenv.mkDerivation { # Note: the dietlibc patch is just to get findutils to compile. # The locate command probably won't work though. ++ stdenv.lib.optional (stdenv ? isDietLibC) ./dietlibc-hack.patch; + + meta = { + homepage = http://www.gnu.org/software/findutils/; + description = "The basic directory searching utilities of the GNU operating system"; + }; } diff --git a/pkgs/tools/misc/relfs/cvs.2007.12.01.nix b/pkgs/tools/misc/relfs/cvs.2007.12.01.nix index 08d2d6f2ebe..83beb68151f 100644 --- a/pkgs/tools/misc/relfs/cvs.2007.12.01.nix +++ b/pkgs/tools/misc/relfs/cvs.2007.12.01.nix @@ -1,7 +1,7 @@ args : with args; let localDefs = builderDefs { src = /* put a fetchurl here */ - fetchcvs { + if args ? src then args.src else fetchcvs { url = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs"; module = "relfs"; date = "2007-12-01"; diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/1.10.2.nix similarity index 100% rename from pkgs/tools/networking/wget/default.nix rename to pkgs/tools/networking/wget/1.10.2.nix diff --git a/pkgs/tools/networking/wget/1.11.nix b/pkgs/tools/networking/wget/1.11.nix new file mode 100644 index 00000000000..c7295f1df94 --- /dev/null +++ b/pkgs/tools/networking/wget/1.11.nix @@ -0,0 +1,16 @@ +args: with args; + +stdenv.mkDerivation rec { + name = "wget-" + version; + src = fetchurl { + url = "mirror://gnu/wget/${name}.tar.bz2"; + sha256 = "0mhd3181zdp1fwirxw0km7502sfvjmm1ncska9w6s2drczf37aix"; + }; + + buildInputs = [gettext]; + + meta = { + description = "A console downloading program. Has some features for mirroring sites."; + homepage = http://www.gnu.org/software/wget; + }; +} diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix index dd522fe1d96..16c86fbe804 100644 --- a/pkgs/tools/security/gnupg/default.nix +++ b/pkgs/tools/security/gnupg/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { builder = ./builder.sh; src = fetchurl { url = ftp://ftp.cert.dfn.de/pub/tools/crypt/gcrypt/gnupg/gnupg-1.4.8.tar.bz2; - sha1 = "4b63267358e5c70f05b48e27d6877bad2636cabd"; + sha256 = "0v009vqpa4l9zwhcaaagz5sx65fjp8g0alsf8kac5s5gvrs2b78i"; }; buildInputs = [readline]; idea = if ideaSupport then fetchurl { diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index 066f594ea84..4d7dcb93db2 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { unpackCmd = "(mkdir cron && cd cron && sh $src)"; preBuild = " - substituteInPlace Makefile --replace '-o root' '' --replace 111 755 + substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755 makeFlags=\"DESTROOT=$out\" "; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 3c0d5479ec5..44b7715607c 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -2,10 +2,17 @@ stdenv.mkDerivation { name = "diffutils-2.8.1"; + src = fetchurl { url = mirror://gnu/diffutils/diffutils-2.8.1.tar.gz; md5 = "71f9c5ae19b60608f6c7f162da86a428"; }; + /* If no explicit coreutils is given, use the one from stdenv. */ buildInputs = [coreutils]; + + meta = { + homepage = http://www.gnu.org/software/diffutils/diffutils.html; + description = "Commands for showing the differences between files (diff, cmp, etc.)"; + }; } diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 2c495f8c271..10dd08214af 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,9 +1,15 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "gawk-3.1.5"; + name = "gawk-3.1.6"; + src = fetchurl { - url = ftp://ftp.gnu.org/gnu/gawk/gawk-3.1.5.tar.bz2; - md5 = "5703f72d0eea1d463f735aad8222655f"; + url = mirror://gnu/gawk/gawk-3.1.6.tar.bz2; + sha256 = "0v6ba4hxfiiy3bny5japd3zmzxlh8vdkmswk96yngd6i1dddsgsi"; + }; + + meta = { + homepage = http://www.gnu.org/software/gawk/; + description = "GNU implementation of the AWK programming language"; }; } diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 15a7a5ad239..9b36dad6cfe 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -1,10 +1,17 @@ {stdenv, fetchurl, pcre}: stdenv.mkDerivation { - name = "gnugrep-2.5.1a"; + name = "gnugrep-2.5.3"; + src = fetchurl { - url = http://ftp.gnu.org/gnu/grep/grep-2.5.1a.tar.bz2; - md5 = "52202fe462770fa6be1bb667bd6cf30c"; + url = http://nix.cs.uu.nl/dist/tarballs/grep-2.5.3-with-info.tar.bz2; + sha256 = "0rg9dipksqzbg8v1xalib1n3xkkycc5r1l2gb9cxy1cz3cjip5l8"; }; + buildInputs = [pcre]; + + meta = { + homepage = http://www.gnu.org/software/grep/; + description = "GNU implementation of the Unix grep command"; + }; } diff --git a/pkgs/tools/text/gnused/default.nix b/pkgs/tools/text/gnused/default.nix index c70cf022570..2425147688b 100644 --- a/pkgs/tools/text/gnused/default.nix +++ b/pkgs/tools/text/gnused/default.nix @@ -2,10 +2,17 @@ stdenv.mkDerivation { name = "gnused-4.1.5"; + src = fetchurl { url = mirror://gnu/sed/sed-4.1.5.tar.gz; md5 = "7a1cbbbb3341287308e140bd4834c3ba"; }; + # !!! hack: this should go away in gnused > 4.1.5 patches = [./gettext-fix.patch]; + + meta = { + homepage = http://www.gnu.org/software/grep/; + description = "GNU implementation of the Unix sed command"; + }; } diff --git a/pkgs/tools/text/replace/default.nix b/pkgs/tools/text/replace/default.nix index 3135204ef03..ca96309e40e 100644 --- a/pkgs/tools/text/replace/default.nix +++ b/pkgs/tools/text/replace/default.nix @@ -1,4 +1,5 @@ {stdenv, fetchurl}: + stdenv.mkDerivation { name = "replace-2.24"; @@ -7,14 +8,12 @@ stdenv.mkDerivation { sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm"; }; - buildInputs = []; - makeFlags = " TREE=\$(out) "; + makeFlags = "TREE=\$(out)"; postInstall = "mv \$out/bin/replace \$out/bin/replace-literal"; meta = { - description = " - Replace verbatim strings. Sed is not fit to do it. Replace is. -"; + homepage = http://replace.richardlloyd.org.uk/; + description = "A tool to replace verbatim strings"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cb844a6eaa..5a207434202 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -119,7 +119,8 @@ rec { # inside the set for derivations. recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;}; - useFromStdenv = hasIt: it: alternative: if hasIt then it else alternative; + useFromStdenv = it : alternative : if (builtins.hasAttr it stdenv) then + (builtins.getAttr it stdenv) else alternative; lib = import ../lib; @@ -257,7 +258,15 @@ rec { # Call a specific version of a Nix expression, that is, # `selectVersion ./foo {version = "0.1.2"; args...}' evaluates to # `import ./foo/0.1.2.nix args'. - selectVersion = dir: args: import (dir + "/${args.version}.nix") args; + selectVersion = dir: defVersion: args: + let + pVersion = + if (args ? version && args.version != "") then + args.version + else + getConfig [ (baseNameOf (toString dir)) "version" ] defVersion; + in + import (dir + "/${pVersion}.nix") (args // { version = pVersion; }); ### STANDARD ENVIRONMENT @@ -279,8 +288,6 @@ rec { } else defaultStdenv; - stdenvUsingSetupNew2 = overrideSetup stdenv ../stdenv/generic/setup-new-2.sh; - ### BUILD SUPPORT @@ -309,7 +316,7 @@ rec { # Allow the stdenv to determine fetchurl, to cater for strange # requirements. - fetchurl = useFromStdenv (stdenv ? fetchurl) stdenv.fetchurl + fetchurl = useFromStdenv "fetchurl" (import ../build-support/fetchurl { inherit stdenv curl; }); @@ -337,15 +344,14 @@ rec { writeScriptBin = name: text: runCommand name {inherit text;} "mkdir -p \$out/bin; echo -n \"\$text\" > \$out/bin/\$name ; chmod +x \$out/bin/\$name"; - stdenvNewSetupScript = overrideSetup stdenv ../stdenv/generic/setup-new.sh; - substituteAll = import ../build-support/substitute/substitute-all.nix { - stdenv = stdenvNewSetupScript; + inherit stdenv; }; nukeReferences = import ../build-support/nuke-references/default.nix { inherit stdenv; }; + ### TOOLS @@ -358,8 +364,10 @@ rec { inherit fetchurl stdenv zlib wxGTK; }; - avahi = import ../development/libraries/avahi { - inherit stdenv fetchurl pkgconfig libdaemon dbus; + avahi = selectVersion ../development/libraries/avahi "0.6.22" { + inherit stdenv fetchurl pkgconfig libdaemon dbus perl perlXMLParser qt4 + python expat; + inherit (gtkLibs) glib gtk; }; axel = import ../tools/networking/axel { @@ -392,7 +400,7 @@ rec { inherit fetchurl stdenv; }; - bzip2 = useFromStdenv (stdenv ? bzip2) stdenv.bzip2 + bzip2 = useFromStdenv "bzip2" (import ../tools/compression/bzip2 { inherit fetchurl stdenv; }); @@ -409,7 +417,7 @@ rec { inherit fetchurl stdenv; }; - coreutils = useFromStdenv (stdenv ? coreutils) stdenv.coreutils + coreutils = useFromStdenv "coreutils" ((if stdenv ? isDietLibC then import ../tools/misc/coreutils-5 else import ../tools/misc/coreutils) @@ -441,7 +449,7 @@ rec { inherit fetchurl stdenv groff nettools coreutils iputils gnused bash; }; - diffutils = useFromStdenv (stdenv ? diffutils) stdenv.diffutils + diffutils = useFromStdenv "diffutils" (import ../tools/text/diffutils { inherit fetchurl stdenv coreutils; }); @@ -480,7 +488,7 @@ rec { qt = qt3; }; - findutils = useFromStdenv (stdenv ? findutils) stdenv.findutils + findutils = useFromStdenv "findutils" (if system == "i686-darwin" then findutils4227 else import ../tools/misc/findutils { inherit fetchurl stdenv coreutils; @@ -504,20 +512,18 @@ rec { libungif libpng libjpeg libtiff libxml2; }; - gawk = useFromStdenv (stdenv ? gawk) stdenv.gawk + gawk = useFromStdenv "gawk" (import ../tools/text/gawk { inherit fetchurl stdenv; }); - gdmapFun = lib.sumArgs (selectVersion ../tools/system/gdmap) { + gdmapFun = lib.sumArgs (selectVersion ../tools/system/gdmap "0.7.5") { inherit stdenv fetchurl builderDefs pkgconfig libxml2 intltool; inherit (gtkLibs) gtk; }; - gdmap = gdmapFun { - version = "0.7.5"; - } null; + gdmap = gdmapFun null; getopt = import ../tools/misc/getopt { inherit fetchurl stdenv; @@ -528,12 +534,12 @@ rec { inherit (xlibs) libXext; }; - gnugrep = useFromStdenv (stdenv ? gnugrep) stdenv.gnugrep + gnugrep = useFromStdenv "gnugrep" (import ../tools/text/gnugrep { inherit fetchurl stdenv pcre; }); - gnupatch = useFromStdenv (stdenv ? patch) stdenv.patch (import ../tools/text/gnupatch { + gnupatch = useFromStdenv "patch" (import ../tools/text/gnupatch { inherit fetchurl stdenv; }); @@ -557,7 +563,7 @@ rec { x11Support = true; }; - gnused = useFromStdenv (stdenv ? gnused) stdenv.gnused + gnused = useFromStdenv "gnused" (import ../tools/text/gnused { inherit fetchurl stdenv; }); @@ -566,7 +572,7 @@ rec { inherit fetchurl stdenv; }; - gnutar = useFromStdenv (stdenv ? gnutar) stdenv.gnutar + gnutar = useFromStdenv "gnutar" (import ../tools/archivers/gnutar { inherit fetchurl stdenv; }); @@ -597,7 +603,7 @@ rec { inherit (gtkLibs) glib gtk; }; - gzip = useFromStdenv (stdenv ? gzip) stdenv.gzip + gzip = useFromStdenv "gzip" (import ../tools/compression/gzip { inherit fetchurl stdenv; }); @@ -610,17 +616,13 @@ rec { inherit fetchurl stdenv ocaml; }; - /*hyppocampusFun = lib.sumArgs ( selectVersion ../tools/misc/hyppocampus ) { + /*hyppocampusFun = lib.sumArgs ( selectVersion ../tools/misc/hyppocampus "0.3rc1") { inherit builderDefs stdenv fetchurl libdbi libdbiDrivers fuse pkgconfig perl gettext dbus dbus_glib pcre libscd; inherit (gtkLibs) glib; bison = bison23; flex = flex2533; - }; - - hyppocampus = hyppocampusFun { - version = "0.3rc1"; - } null;*/ + };*/ jdiskreport = import ../tools/misc/jdiskreport { inherit fetchurl stdenv unzip jdk; @@ -698,8 +700,7 @@ rec { inherit fetchurl stdenv gettext; }; - nc6Fun = lib.sumArgs (selectVersion ../tools/networking/nc6) { - version = "1.0"; + nc6Fun = lib.sumArgs (selectVersion ../tools/networking/nc6 "1.0") { inherit builderDefs; }; @@ -778,15 +779,13 @@ rec { zlibSupport = !stdenv ? isDietLibC; }; - relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs) { + relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs "cvs.2007.12.01") { inherit fetchcvs stdenv ocaml postgresql fuse pcre builderDefs e2fsprogs pkgconfig; inherit (gnome) gnomevfs GConf; }; - relfs = relfsFun { - version = "cvs.2007.12.01"; - } null; + relfs = relfsFun null; replace = import ../tools/text/replace { inherit fetchurl stdenv; @@ -799,9 +798,8 @@ rec { }; */ - rlwrapFun = lib.sumArgs (selectVersion ../tools/misc/rlwrap) { - version = "0.28"; - inherit builderDefs readline; + rlwrapFun = lib.sumArgs (selectVersion ../tools/misc/rlwrap "0.28") { + inherit builderDefs readline; }; rlwrap = rlwrapFun null; @@ -818,24 +816,25 @@ rec { inherit fetchurl stdenv ncurses; }; + sharutils = selectVersion ../tools/archivers/sharutils "4.6.3" { + inherit fetchurl stdenv; + }; + shebangfix = import ../tools/misc/shebangfix { - inherit perl; - stdenv = overrideSetup stdenv ../stdenv/generic/setup-new-2.sh; + inherit stdenv perl; }; smartmontools = import ../tools/system/smartmontools { inherit fetchurl stdenv; }; - smbfsFuseFun = lib.sumArgs (selectVersion ../tools/networking/smbfs-fuse) { - version = "0.8.7"; + smbfsFuseFun = lib.sumArgs (selectVersion ../tools/networking/smbfs-fuse "0.8.7") { inherit builderDefs samba fuse; }; smbfsFuse = smbfsFuseFun null; - socatFun = lib.sumArgs (selectVersion ../tools/networking/socat) { - version = "1.6.0.0"; + socatFun = lib.sumArgs (selectVersion ../tools/networking/socat "1.6.0.0") { inherit builderDefs openssl; }; @@ -915,17 +914,19 @@ rec { inherit fetchurl stdenv; }; - wget = import ../tools/networking/wget { + wgetFun = lib.sumArgs (selectVersion ../tools/networking/wget "1.11") { inherit fetchurl stdenv gettext; }; + wget = wgetFun null; + which = import ../tools/system/which { inherit fetchurl stdenv readline; }; wv = import ../tools/misc/wv { inherit fetchurl stdenv libpng zlib imagemagick - pkgconfig libgsf libxml2 bzip2; + pkgconfig libgsf libxml2 bzip2; inherit (gtkLibs) glib; }; @@ -977,26 +978,24 @@ rec { ### SHELLS - bash = lowPrio (useFromStdenv (stdenv ? bash) stdenv.bash + bash = lowPrio (useFromStdenv "bash" (import ../shells/bash { inherit fetchurl stdenv; bison = bison23; })); bashInteractive = appendToName "interactive" (import ../shells/bash { - inherit fetchurl ncurses; + inherit fetchurl stdenv ncurses; bison = bison23; interactive = true; - stdenv = stdenvUsingSetupNew2; }); tcsh = import ../shells/tcsh { inherit fetchurl stdenv ncurses; }; - zshFun = lib.sumArgs (selectVersion ../shells/zsh) { + zshFun = lib.sumArgs (selectVersion ../shells/zsh "4.3.5") { inherit fetchurl stdenv ncurses coreutils; - version = "4.3.5"; }; zsh = zshFun null; @@ -1080,7 +1079,7 @@ rec { inherit stdenv; }; - gcc = gcc41; + gcc = gcc42; gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 { inherit fetchurl stdenv noSysDirs; @@ -1099,14 +1098,12 @@ rec { profiledCompiler = true; }); - gcc41 = useFromStdenv (stdenv ? gcc) stdenv.gcc (wrapGCC (import ../development/compilers/gcc-4.1 { + gcc41 = wrapGCC (import ../development/compilers/gcc-4.1 { inherit fetchurl stdenv noSysDirs; profiledCompiler = false; - })); + }); - gcc41NPTL = wrapGCCWithGlibc gcc41.gcc glibcNPTL; - - gcc42 = lowPrio (wrapGCC (import ../development/compilers/gcc-4.2 { + gcc42 = useFromStdenv "gcc" (wrapGCC (import ../development/compilers/gcc-4.2 { inherit fetchurl stdenv noSysDirs; profiledCompiler = true; })); @@ -1119,7 +1116,7 @@ rec { # This new ghc stuff is under heavy development and will change ! # ========= ======================================================= - # usage: see ghcPkgUtil.sh - use setup-new2 because of PATH_DELIMITER + # usage: see ghcPkgUtil.sh # depreceated -> use functions defined in builderDefs ghcPkgUtil = runCommand "ghcPkgUtil-internal" { ghcPkgUtil = ../development/libraries/haskell/generic/ghcPkgUtil.sh; } @@ -1128,17 +1125,15 @@ rec { ghcsAndLibs = assert builtins ? listToAttrs; recurseIntoAttrs (import ../development/compilers/ghcs { - inherit ghcboot fetchurl recurseIntoAttrs perl gnum4 gmp readline lib; + inherit ghcboot fetchurl stdenv recurseIntoAttrs perl gnum4 gmp readline lib; inherit ghcPkgUtil annotatedDerivations hasktags ctags; - stdenv = stdenvUsingSetupNew2; }); # creates ghc-X-wl wich adds the passed libraries to the env var GHC_PACKAGE_PATH createGhcWrapper = { ghcPackagedLibs ? false, ghc, libraries, name, suffix ? "ghc_wrapper_${ghc.name}" } : import ../development/compilers/ghc/createGhcWrapper { - inherit ghcPackagedLibs ghc name suffix libraries ghcPkgUtil + inherit stdenv ghcPackagedLibs ghc name suffix libraries ghcPkgUtil annotatedDerivations lib sourceWithTagsDerivation annotatedWithSourceAndTagInfo; - stdenv = stdenvUsingSetupNew2; installSourceAndTags = true; }; @@ -1152,7 +1147,7 @@ rec { # used now # goSrc contains source directory (containing the .cabal file) ghcCabalDerivation = args : null_ : with lib; with args; - stdenvUsingSetupNew2.mkDerivation ({ + stdenv.mkDerivation ({ goSrcDir = "cd ${srcDir}"; inherit name src propagatedBuildInputs; phases = "unpackPhase patchPhase buildPhase"; @@ -1486,8 +1481,7 @@ rec { ocaml = getVersion "ocaml" ocaml_alts; ocaml_alts = import ../development/compilers/ocaml { - inherit fetchurl stdenv x11 ncurses stdenvUsingSetupNew2; - stdenv34 = overrideGCC stdenv gcc34; + inherit fetchurl stdenv x11 ncurses; }; /* @@ -1599,9 +1593,8 @@ rec { inherit (xlibs) libX11 libXau libXt; }; - erlang = import ../development/interpreters/erlang { - stdenv = overrideGCC stdenv gcc41NPTL; - inherit fetchurl perl gnum4 ncurses openssl; + erlang = selectVersion ../development/interpreters/erlang "R12B-1" { + inherit fetchurl stdenv perl gnum4 ncurses openssl; }; guile = import ../development/interpreters/guile { @@ -1642,12 +1635,9 @@ rec { # compiling without xdebug is currenlty broken (should be easy to fix though php_unstable = (import ../development/interpreters/php_configurable) { - inherit mkDerivationByConfiguration autoconf automake lib; - stdenv = stdenvUsingSetupNew2; + inherit stdenv mkDerivationByConfiguration autoconf automake lib; # optional features - inherit fetchurl flex bison apacheHttpd mysql; # gettext; - inherit libxml2; - inherit postgresql; + inherit fetchurl flex bison apacheHttpd mysql libxml2; # gettext; inherit zlib; flags = [ "xdebug" "mysql" "mysqli" "pdo_mysql" "libxml2" "apxs2" ]; }; @@ -1658,20 +1648,18 @@ rec { inherit fetchurl stdenv zlib bzip2; }; - pyrexFun = lib.sumArgs (selectVersion ../development/interpreters/pyrex) { + pyrexFun = lib.sumArgs (selectVersion ../development/interpreters/pyrex "0.9.6") { inherit fetchurl stdenv stringsWithDeps lib builderDefs; python = builtins.getAttr "2.5" python_alts; }; - pyrex = pyrexFun {version = "0.9.6";} null; + pyrex = pyrexFun null; - QiFun = lib.sumArgs (selectVersion ../development/compilers/qi) { + QiFun = lib.sumArgs (selectVersion ../development/compilers/qi "9.1") { inherit clisp stdenv fetchurl builderDefs unzip; }; - Qi = QiFun { - version = getConfig ["Qi" "version"] "9.1"; - } null; + Qi = QiFun null; realPerl = import ../development/interpreters/perl { inherit fetchurl stdenv; @@ -1784,7 +1772,7 @@ rec { # inherit lib fetchurl stdenv flex yacc; #}; - binutils = useFromStdenv (stdenv ? binutils) stdenv.binutils + binutils = useFromStdenv "binutils" (import ../development/tools/misc/binutils { inherit fetchurl stdenv noSysDirs; }); @@ -1812,13 +1800,11 @@ rec { }; elfutilsFun = lib.sumArgs - (selectVersion ../development/tools/misc/elfutils) { + (selectVersion ../development/tools/misc/elfutils "0.131") { inherit fetchurl stdenv; }; - elfutils = elfutilsFun { - version = "0.131"; - } null; + elfutils = elfutilsFun null; epm = import ../development/tools/misc/epm { inherit fetchurl stdenv rpm; @@ -1848,7 +1834,7 @@ rec { inherit fetchurl stdenv; }; - gnumake = useFromStdenv (stdenv ? gnumake) stdenv.gnumake + gnumake = useFromStdenv "gnumake" (import ../development/tools/build-managers/gnumake { inherit fetchurl stdenv; }); @@ -1878,8 +1864,7 @@ rec { }; hasktags = import ../development/tools/misc/hasktags { - inherit fetchurl; - stdenv = stdenvUsingSetupNew2; + inherit fetchurl stdenv; ghc = ghcsAndLibs.ghc68.ghc; }; @@ -1891,13 +1876,11 @@ rec { inherit fetchurl stdenv perl perlXMLSimple; }; - indentFun = lib.sumArgs (selectVersion ../development/tools/misc/indent) { + indentFun = lib.sumArgs (selectVersion ../development/tools/misc/indent "2.2.9") { inherit fetchurl stdenv builderDefs; }; - indent = indentFun { - version = "2.2.9"; - } null; + indent = indentFun null; jikespg = import ../development/tools/parsing/jikespg { inherit fetchurl stdenv; @@ -1921,11 +1904,13 @@ rec { inherit fetchurl stdenv; }; - ltrace = import ../development/tools/misc/ltrace { + ltraceFun = lib.sumArgs (selectVersion ../development/tools/misc/ltrace "0.5-3deb") { inherit fetchurl stdenv builderDefs stringsWithDeps lib; elfutils = elfutilsFun {version = "0.127";} null; }; + ltrace = ltraceFun null; + mk = import ../development/tools/build-managers/mk { inherit fetchurl stdenv; }; @@ -1934,7 +1919,7 @@ rec { inherit fetchurl stdenv; }; - patchelf = useFromStdenv (stdenv ? patchelf) stdenv.patchelf + patchelf = useFromStdenv "patchelf" (import ../development/tools/misc/patchelf { inherit fetchurl stdenv; }); @@ -1943,7 +1928,7 @@ rec { * pkgconfig is optionally taken from the stdenv to allow bootstrapping * of glib and pkgconfig itself on MinGW. */ - pkgconfig = useFromStdenv (stdenv ? pkgconfig) stdenv.pkgconfig + pkgconfig = useFromStdenv "pkgconfig" (import ../development/tools/misc/pkgconfig { inherit fetchurl stdenv; }); @@ -2103,6 +2088,10 @@ rec { inherit fetchurl stdenv pkgconfig x11 fontconfig freetype zlib libpng; }; + cairomm = import ../development/libraries/cairomm { + inherit fetchurl stdenv pkgconfig cairo x11 fontconfig freetype; + }; + chmlib = import ../development/libraries/chmlib { inherit fetchurl stdenv; }; @@ -2159,20 +2148,11 @@ rec { inherit fetchurl stdenv; }; - # I think, this is a bad practice to use getVersion for various build - # variants, but it's 5 o'clock now... - dbus = getVersion "dbus" dbus_alts; - - dbus_alts = rec - { - noX11 = import ../development/libraries/dbus { + dbus = import ../development/libraries/dbus { inherit fetchurl stdenv pkgconfig expat; - }; - withX11 = import ../development/libraries/dbus_x { - inherit fetchurl stdenv pkgconfig expat; inherit (xlibs) libX11 libICE libSM; - }; - default = noX11; + useX11 = getConfig [ "dbus" "tools" "useX11" ] + (getConfig [ "services" "xserver" "enable" ] false); }; dbus_glib = import ../development/libraries/dbus-glib { @@ -2188,7 +2168,7 @@ rec { inherit fetchurl stdenv perl; }; - enchant = import ../development/libraries/enchant { + enchant = selectVersion ../development/libraries/enchant "1.3.0" { inherit fetchurl stdenv aspell pkgconfig; inherit (gnome) glib; }; @@ -2202,10 +2182,9 @@ rec { }; facile = import ../development/libraries/facile { - inherit fetchurl; - # Actually, we don't need this version but we need native-code compilation - ocaml = builtins.getAttr "3.10.0" ocaml_alts; - stdenv = stdenvUsingSetupNew2; + inherit fetchurl stdenv; + # Actually, we don't need this version but we need native-code compilation + ocaml = builtins.getAttr "3.10.0" ocaml_alts; }; fcgi = import ../development/libraries/fcgi { @@ -2269,12 +2248,12 @@ rec { # python / ruby support }; - gettext = getVersion "gettext" gettext_alts; - - gettext_alts = import ../development/libraries/gettext { + gettextFun = lib.sumArgs (selectVersion ../development/libraries/gettext "0.16.x") { inherit fetchurl stdenv; }; + gettext = gettextFun null; + gd = import ../development/libraries/gd { inherit fetchurl stdenv zlib libpng freetype libjpeg fontconfig; }; @@ -2292,22 +2271,12 @@ rec { inherit (xlibs) libXmu libXi; }; - glibc = useFromStdenv (stdenv ? glibc) stdenv.glibc - (import ../development/libraries/glibc { + glibc = useFromStdenv "glibc" + (import ../development/libraries/glibc-2.7 { inherit fetchurl stdenv kernelHeaders; #installLocales = false; }); - glibcNPTL = import ../development/libraries/glibc-nptl { - inherit fetchurl kernelHeaders perl; - stdenv = overrideGCC stdenv gcc34; - }; - - glibmm = import ../development/libraries/gtk-libs-2.6/glibmm { - inherit fetchurl stdenv pkgconfig libsigcxx; - inherit (gtkLibs26) glib; - }; - gmime = import ../development/libraries/gmime { inherit fetchurl stdenv pkgconfig zlib; inherit (gtkLibs) glib; @@ -2343,45 +2312,17 @@ rec { gtkLibs = recurseIntoAttrs gtkLibs210; - gtkLibs1x = import ../development/libraries/gtk-libs-1.x { + gtkLibs1x = import ../development/libraries/gtk-libs/1.x { inherit fetchurl stdenv x11 libtiff libjpeg libpng; }; - gtkLibs210 = import ../development/libraries/gtk-libs-2.10 { + gtkLibs210 = import ../development/libraries/gtk-libs/2.10 { inherit fetchurl stdenv pkgconfig gettext perl x11 - libtiff libjpeg libpng cairo; + libtiff libjpeg libpng cairo libsigcxx cairomm; inherit (xlibs) libXinerama libXrandr; xineramaSupport = true; }; - gtkLibs22 = import ../development/libraries/gtk-libs-2.2 { - inherit fetchurl stdenv pkgconfig gettext perl x11 - libtiff libjpeg libpng; - }; - - gtkLibs24 = import ../development/libraries/gtk-libs-2.4 { - inherit fetchurl stdenv pkgconfig gettext perl x11 - libtiff libjpeg libpng; - }; - - gtkLibs26 = import ../development/libraries/gtk-libs-2.6 { - inherit fetchurl stdenv pkgconfig gettext perl x11 - libtiff libjpeg libpng; - }; - - gtkLibs28 = import ../development/libraries/gtk-libs-2.8 { - inherit fetchurl stdenv pkgconfig gettext perl x11 - libtiff libjpeg libpng cairo; - inherit (xlibs) libXinerama; - xineramaSupport = true; - }; - - gtkmm = import ../development/libraries/gtk-libs-2.6/gtkmm { - inherit fetchurl stdenv pkgconfig libsigcxx; - inherit (gtkLibs26) gtk atk; - inherit glibmm; - }; - gtkmozembedsharp = import ../development/libraries/gtkmozembed-sharp { inherit fetchurl stdenv mono pkgconfig monoDLLFixer; inherit (gnome) gtk; @@ -2433,6 +2374,10 @@ rec { inherit fetchurl stdenv; }; + ilbc = import ../development/libraries/ilbc { + inherit stdenv msilbc; + }; + ilmbase = import ../development/libraries/ilmbase { inherit fetchurl stdenv; }; @@ -2454,12 +2399,12 @@ rec { inherit fetchurl stdenv; }; - intltoolFun = lib.sumArgs (selectVersion ../development/tools/misc/intltool) { + intltoolFun = lib.sumArgs (selectVersion ../development/tools/misc/intltool "0.36.2") { inherit fetchurl stdenv lib builderDefs stringsWithDeps perl perlXMLParser; }; - intltool = intltoolFun {version = "0.36.2";} null; + intltool = intltoolFun null; jasper = import ../development/libraries/jasper { inherit fetchurl stdenv unzip libjpeg freeglut mesa; @@ -2488,8 +2433,8 @@ rec { inherit stdenv fetchurl pkgconfig; }; - libarchive = import ../development/libraries/libarchive { - inherit fetchurl stdenv zlib; + libarchive = selectVersion ../development/libraries/libarchive "2.4.12" { + inherit fetchurl stdenv zlib bzip2 e2fsprogs sharutils; }; libassuan = import ../development/libraries/libassuan { @@ -2517,20 +2462,17 @@ rec { inherit fetchurl stdenv; }; - libdbiFun = lib.sumArgs (selectVersion ../development/libraries/libdbi) { + libdbiFun = lib.sumArgs (selectVersion ../development/libraries/libdbi "0.8.2") { inherit stdenv fetchurl builderDefs; }; - libdbi = libdbiFun { - version = "0.8.2"; - } null; + libdbi = libdbiFun null; - libdbiDriversFun = lib.sumArgs (selectVersion ../development/libraries/libdbi-drivers) { + libdbiDriversFun = lib.sumArgs (selectVersion ../development/libraries/libdbi-drivers "0.8.2-1") { inherit stdenv fetchurl builderDefs libdbi; }; libdbiDrivers = libdbiDriversFun { - version = "0.8.2-1"; mysql = mysql5; inherit sqlite; } null; @@ -2563,14 +2505,12 @@ rec { inherit fetchurl stdenv gettext; }; - libextractorFun = lib.sumArgs (selectVersion ../development/libraries/libextractor) + libextractorFun = lib.sumArgs (selectVersion ../development/libraries/libextractor "0.5.18") { inherit fetchurl stdenv builderDefs zlib; }; - libextractor = libextractorFun { - version = "0.5.18"; - } null; + libextractor = libextractorFun null; libgcrypt = import ../development/libraries/libgcrypt { inherit fetchurl stdenv libgpgerror; @@ -2607,6 +2547,10 @@ rec { inherit fetchurl stdenv pkgconfig libraw1394; }; + libjingle = selectVersion ../development/libraries/libjingle "0.3.11" { + inherit fetchurl stdenv mediastreamer; + }; + libjpeg = import ../development/libraries/libjpeg { inherit fetchurl stdenv libtool; }; @@ -2656,19 +2600,17 @@ rec { inherit fetchurl stdenv zlib; }; - /*libscdFun = lib.sumArgs (selectVersion ../development/libraries/libscd) { + /*libscdFun = lib.sumArgs (selectVersion ../development/libraries/libscd "0.4.2") { inherit stdenv fetchurl builderDefs libextractor perl pkgconfig; }; - libscd = libscdFun { - version = "0.4.2"; - } null;*/ + libscd = libscdFun null;*/ libsigcxx = import ../development/libraries/libsigcxx { inherit fetchurl stdenv pkgconfig; }; - libsigsegv = import ../development/libraries/libsigsegv { + libsigsegv = selectVersion ../development/libraries/libsigsegv "2.5" { inherit fetchurl stdenv; }; @@ -2719,6 +2661,12 @@ rec { inherit fetchurl stdenv; }; + libxklavier = selectVersion ../development/libraries/libxklavier "3.4" { + inherit fetchurl stdenv xkeyboard_config pkgconfig libxml2; + inherit (xorg) libX11 libICE libxkbfile; + inherit (gtkLibs) glib; + }; + libxml2 = import ../development/libraries/libxml2 { inherit fetchurl stdenv zlib python; pythonSupport = false; @@ -2747,7 +2695,7 @@ rec { }; log4cxx = import ../development/libraries/log4cxx { - inherit fetchurl stdenv automake autoconf libtool cppunit libxml2; + inherit fetchurl stdenv automake autoconf libtool cppunit libxml2 boost; }; loudmouth = import ../development/libraries/loudmouth { @@ -2759,6 +2707,16 @@ rec { inherit fetchurl stdenv; }; +#failed to build + mediastreamerFun = lib.sumArgs (selectVersion + ../development/libraries/mediastreamer "2.2.0-cvs20080207") { + inherit fetchurl stdenv automake libtool autoconf alsaLib pkgconfig speex + ortp; + ffmpeg = ffmpeg_svn; + }; + + mediastreamer = mediastreamerFun null; + mesaSupported = system == "i686-linux" || system == "x86_64-linux"; @@ -2776,6 +2734,10 @@ rec { inherit fetchurl stdenv; }; + msilbc = selectVersion ../development/libraries/msilbc "2.0.0" { + inherit fetchurl stdenv ilbc mediastreamer pkgconfig; + }; + mysqlConnectorODBC = import ../development/libraries/mysql-connector-odbc { inherit fetchurl stdenv mysql libtool zlib unixODBC; }; @@ -2841,7 +2803,7 @@ rec { inherit fetchurl stdenv perl; }; - ortp = import ../development/libraries/ortp { + ortp = selectVersion ../development/libraries/ortp "0.13.1" { inherit fetchurl stdenv; }; @@ -2853,11 +2815,12 @@ rec { pcre = import ../development/libraries/pcre { inherit fetchurl stdenv; unicodeSupport = getConfig ["pcre" "unicode"] false; + cplusplusSupport = !stdenv ? isDietLibC; }; poppler = import ../development/libraries/poppler { - inherit fetchurl stdenv qt4 cairo freetype fontconfig zlib libjpeg; - inherit (gtkLibs) glib gtk; + inherit fetchurl stdenv qt4 cairo freetype fontconfig zlib libjpeg; + inherit (gtkLibs) glib gtk; }; popt = import ../development/libraries/popt { @@ -2887,13 +2850,12 @@ rec { qt4 = getVersion "qt4" qt4_alts; qt4_alts = import ../development/libraries/qt-4 { - inherit fetchurl fetchsvn zlib libjpeg libpng which mysql mesa openssl cups dbus + inherit fetchurl stdenv fetchsvn zlib libjpeg libpng which mysql mesa openssl cups dbus fontconfig freetype pkgconfig libtiff; inherit (xlibs) xextproto libXft libXrender libXrandr randrproto libXmu libXinerama xineramaproto libXcursor libICE libSM libX11 libXext inputproto fixesproto libXfixes; inherit (gnome) glib; - stdenv = overrideSetup stdenv ../stdenv/generic/setup-new-2.sh; openglSupport = mesaSupported; mysqlSupport = true; }; @@ -2910,8 +2872,9 @@ rec { # Also known as librdf, includes raptor and rasqal redland = import ../development/libraries/redland { - inherit fetchurl stdenv openssl libxml2 pkgconfig perl; - bdb = db4; + inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite + mysql libxslt curl pcre; + bdb = db4; }; rte = import ../development/libraries/rte { @@ -2982,9 +2945,8 @@ rec { qt = qt4; }; - tkFun = lib.sumArgs (selectVersion ../development/libraries/tk) { + tkFun = lib.sumArgs (selectVersion ../development/libraries/tk "8.4.16") { inherit fetchurl stdenv tcl x11; - version = "8.4.16"; }; tk = tkFun null; @@ -3558,7 +3520,7 @@ rec { }; mysql5 = import ../servers/sql/mysql5 { - inherit fetchurl stdenv ncurses zlib perl; + inherit fetchurl stdenv ncurses zlib perl openssl; ps = procps; /* !!! Linux only */ }; @@ -3575,7 +3537,7 @@ rec { inherit fetchurl stdenv openssh; }; - postgresql = import ../servers/sql/postgresql { + postgresql = selectVersion ../servers/sql/postgresql "8.3.0" { inherit fetchurl stdenv readline ncurses zlib; }; @@ -3611,7 +3573,7 @@ rec { xorg = recurseIntoAttrs (import ../servers/x11/xorg { inherit fetchurl stdenv pkgconfig freetype fontconfig libxslt expat libdrm libpng zlib perl mesa mesaHeaders - xkeyboard_config gettext; + xkeyboard_config dbus hal; }); @@ -3638,14 +3600,11 @@ rec { inherit fetchurl stdenv; }; - atherosFun = lib.sumArgs (selectVersion ../os-specific/linux/atheros) { + atherosFun = lib.sumArgs (selectVersion ../os-specific/linux/atheros "r3122") { inherit fetchurl stdenv builderDefs; }; - atherosVersion = "r3122"; - atherosFunCurrent = kernel: atherosFun { - version = atherosVersion; inherit kernel; } null; @@ -3674,18 +3633,16 @@ rec { static = true; })); - dmidecodeFun = lib.sumArgs (selectVersion ../os-specific/linux/dmidecode) { + dmidecodeFun = lib.sumArgs (selectVersion ../os-specific/linux/dmidecode "2.9") { inherit fetchurl stdenv builderDefs; }; - dmidecode = dmidecodeFun { - version = "2.9"; - } null; + dmidecode = dmidecodeFun null; dietlibc = import ../os-specific/linux/dietlibc { inherit fetchurl glibc; # Dietlibc 0.30 doesn't compile on PPC with GCC 4.1, bus GCC 3.4 works. - stdenv = if stdenv.system == "powerpc-linux" then overrideGCC stdenv gcc34 else stdenv; + stdenv = if stdenv.system == "powerpc-linux" then overrideGCC stdenv gcc34 else stdenv; }; e2fsprogs = import ../os-specific/linux/e2fsprogs { @@ -3784,15 +3741,13 @@ rec { inherit fetchurl stdenv bison flex; }; - kernelHeaders = import ../os-specific/linux/kernel-headers { - inherit fetchurl stdenv; - }; + kernelHeaders = kernelHeaders_2_6_23; kernelHeaders_2_6_21 = import ../os-specific/linux/kernel-headers/2.6.21.3.nix { inherit fetchurl stdenv; }; - kernelHeaders_2_6_23 = import ../os-specific/linux/kernel-headers/2.6.23.1.nix { + kernelHeaders_2_6_23 = import ../os-specific/linux/kernel-headers/2.6.23.8.nix { inherit fetchurl stdenv; }; @@ -4007,13 +3962,12 @@ rec { [(getConfig ["kernel" "addConfig"] "")]; }; - kqemuFun = lib.sumArgs (selectVersion ../os-specific/linux/kqemu) { + kqemuFun = lib.sumArgs (selectVersion ../os-specific/linux/kqemu "1.3.0pre11") { inherit fetchurl stdenv builderDefs; }; # No finished expression is provided - pick your own kernel kqemuFunCurrent = theKernel: (kqemuFun { - version = "1.3.0pre11"; kernel = theKernel; } null); @@ -4211,13 +4165,11 @@ rec { inherit fetchurl stdenv; }; - sdparmFun = lib.sumArgs (selectVersion ../os-specific/linux/sdparm) { + sdparmFun = lib.sumArgs (selectVersion ../os-specific/linux/sdparm "1.02") { inherit fetchurl stdenv builderDefs; }; - sdparm = sdparmFun { - version = "1.02"; - } null; + sdparm = sdparmFun null; shadowutils = import ../os-specific/linux/shadow { inherit fetchurl stdenv; @@ -4378,7 +4330,7 @@ rec { inherit fetchurl stdenv; }; - shared_mime_info = import ../data/misc/shared-mime-info { + shared_mime_info = selectVersion ../data/misc/shared-mime-info "0.23" { inherit fetchurl stdenv perl perlXMLParser pkgconfig gettext libxml2; inherit (gtkLibs) glib; }; @@ -4399,10 +4351,9 @@ rec { inherit fetchurl stdenv cabextract; }; - xkeyboard_configFun = lib.sumArgs (selectVersion ../data/misc/xkeyboard-config ) { + xkeyboard_configFun = lib.sumArgs (selectVersion ../data/misc/xkeyboard-config "1.2") { inherit fetchurl stdenv perl perlXMLParser gettext; inherit (xlibs) xkbcomp; - version = "1.2"; }; xkeyboard_config = xkeyboard_configFun null; @@ -4442,11 +4393,10 @@ rec { }; audacity = import ../applications/audio/audacity { - inherit fetchurl libogg libvorbis libsndfile libmad + inherit fetchurl stdenv libogg libvorbis libsndfile libmad pkgconfig gettext; inherit (gtkLibs) gtk glib; wxGTK = wxGTK28deps; - stdenv = overrideGCC stdenv gcc41NPTL; inherit builderDefs stringsWithDeps; }; @@ -4480,14 +4430,14 @@ rec { inherit fetchurl stdenv; openal = openalSoft; }; + blender = import ../applications/misc/blender { - inherit cmake mesa gettext freetype SDL libtiff fetchurl glibc scons x11 lib + inherit stdenv cmake mesa gettext freetype SDL libtiff fetchurl glibc scons x11 lib libjpeg libpng zlib /* smpeg sdl */; inherit (xlibs) inputproto libXi; python = builtins.getAttr "2.5" python_alts; freealut = freealut_soft; openal = openalSoft; - stdenv = stdenvUsingSetupNew2; openexr = openexr_1_4_0; }; @@ -4546,7 +4496,7 @@ rec { version = "0.6.2"; }; - compizFun = lib.sumArgs (assert mesaSupported; selectVersion ../applications/window-managers/compiz) { + compizFun = lib.sumArgs (assert mesaSupported; selectVersion ../applications/window-managers/compiz "0.6.2") { inherit lib builderDefs stringsWithDeps; inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt; inherit (xorg) libXcomposite libXfixes libXdamage libXrandr @@ -4564,7 +4514,6 @@ rec { }; compiz = compizFun { - version = getConfig ["compiz" "version"] "0.6.2"; extraConfigureFlags = getConfig ["compiz" "extraConfigureFlags"] []; } null; @@ -4644,13 +4593,12 @@ rec { inherit fetchurl stdenv qt4 djvulibre; }; - dvdplusrwtoolsFun = lib.sumArgs (selectVersion ../os-specific/linux/dvd+rw-tools) { + /* TODO: rename to be able to set version */ + dvdplusrwtoolsFun = lib.sumArgs (selectVersion ../os-specific/linux/dvd+rw-tools "7.0") { inherit fetchurl stdenv builderDefs cdrkit m4; }; - dvdplusrwtools = dvdplusrwtoolsFun { - version = "7.0"; - } null; + dvdplusrwtools = dvdplusrwtoolsFun null; eclipse = plugins: import ../applications/editors/eclipse { @@ -4702,13 +4650,13 @@ rec { openexr = openexr_1_6_1; }; - fbpanelFun = lib.sumArgs (selectVersion ../applications/window-managers/fbpanel) { + fbpanelFun = lib.sumArgs (selectVersion ../applications/window-managers/fbpanel "4.12") { inherit fetchurl stdenv builderDefs pkgconfig libpng libjpeg libtiff librsvg; inherit (gtkLibs) gtk; inherit (xlibs) libX11 libXmu libXpm; }; - fbpanel = fbpanelFun {version="4.12";} null; + fbpanel = fbpanelFun null; fetchmail = import ../applications/misc/fetchmail { inherit stdenv fetchurl; @@ -4827,11 +4775,11 @@ rec { inherit (xlibs) libX11 libXext libXi libXmu; }; - gocrFun = lib.sumArgs (selectVersion ../applications/graphics/gocr) { + gocrFun = lib.sumArgs (selectVersion ../applications/graphics/gocr "0.44") { inherit builderDefs fetchurl stdenv; }; - gocr = gocrFun {version = "0.44";} null; + gocr = gocrFun null; gphoto2 = import ../applications/misc/gphoto2 { inherit fetchurl stdenv pkgconfig libgphoto2 libexif popt readline gettext; @@ -4868,7 +4816,7 @@ rec { inherit (xlibs) libX11 libXft libXext libXinerama libXrandr; }; - imagemagickFun = lib.sumArgs (import ../applications/graphics/ImageMagick) { + imagemagickFun = lib.sumArgs (selectVersion ../applications/graphics/ImageMagick "6.3.8-5" ) { inherit stdenv fetchurl libtool; }; @@ -4886,9 +4834,9 @@ rec { inkscape = import ../applications/graphics/inkscape { inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib - popt libxml2 libxslt libpng boehmgc fontconfig gtkmm - glibmm libsigcxx lcms boost gettext; - inherit (gtkLibs) gtk glib; + popt libxml2 libxslt libpng boehmgc fontconfig + libsigcxx lcms boost gettext cairomm; + inherit (gtkLibs) gtk glib glibmm gtkmm; inherit (xlibs) libXft; }; @@ -4903,8 +4851,7 @@ rec { }; jedit = import ../applications/jedit { - inherit fetchurl ant; - stdenv = overrideSetup stdenv ../stdenv/generic/setup-new-2.sh; + inherit fetchurl stdenv ant; }; joe = import ../applications/editors/joe { @@ -4912,16 +4859,14 @@ rec { }; kino = import ../applications/video/kino { - stdenv = stdenvUsingSetupNew2; - inherit fetchurl pkgconfig libxml2 perl perlXMLParser + inherit fetchurl stdenv pkgconfig libxml2 perl perlXMLParser libdv libraw1394 libavc1394 libiec61883 x11 gettext cairo; /* libavformat */ inherit libsamplerate ffmpeg; inherit (gnome) libglade gtk glib; inherit (xlibs) libXv libX11; inherit (gtkLibs) pango; - - # # optional - # inherit ffmpeg2theora sox, vorbis-tools lame mjpegtools dvdauthor 'Q'dvdauthor growisofs mencoder; + # # optional + # inherit ffmpeg2theora sox, vorbis-tools lame mjpegtools dvdauthor 'Q'dvdauthor growisofs mencoder; }; kuickshow = import ../applications/graphics/kuickshow { @@ -4931,7 +4876,7 @@ rec { }; lame = import ../applications/audio/lame { - inherit fetchurl stdenv ; + inherit fetchurl stdenv; }; ladspaH = import ../applications/audio/ladspa-plugins/ladspah.nix { @@ -5105,7 +5050,7 @@ rec { python = builtins.getAttr "2.5" python_alts; }; - qemuFun = lib.sumArgs (selectVersion ../applications/virtualization/qemu ) { + qemuFun = lib.sumArgs (selectVersion ../applications/virtualization/qemu "0.9.0") { inherit fetchurl; stdenv = overrideGCC stdenv gcc34; builderDefs = builderDefs { @@ -5114,18 +5059,14 @@ rec { inherit SDL zlib which; }; - qemu = qemuFun { - version = "0.9.0"; - } null; + qemu = qemuFun null; qemuImageFun = lib.sumArgs - (selectVersion ../applications/virtualization/qemu/linux-img ) { + (selectVersion ../applications/virtualization/qemu/linux-img "0.2") { inherit builderDefs fetchurl stdenv; }; - qemuImage = qemuImageFun { - version = "0.2"; - } null; + qemuImage = qemuImageFun null; ratpoison = import ../applications/window-managers/ratpoison { inherit fetchurl stdenv fontconfig readline; @@ -5326,16 +5267,14 @@ rec { flags = [ "X11" ]; # only flag "X11" by now }; - /*virtualboxFun = lib.sumArgs (selectVersion ../applications/virtualization/virtualbox) { + /*virtualboxFun = lib.sumArgs (selectVersion ../applications/virtualization/virtualbox "1.5.2") { inherit stdenv fetchurl builderDefs bridge_utils umlutilities kernelHeaders wine jre libxslt SDL qt3 openssl zlib; inherit (xorg) libXcursor; inherit (gnome) libIDL; }; - virtualbox = virtualboxFun { - version = "1.5.2"; - } null;*/ + virtualbox = virtualboxFun null;*/ vlc = import ../applications/video/vlc { inherit fetchurl stdenv perl x11 wxGTK @@ -5382,7 +5321,7 @@ rec { # RealPlayer is disabled by default for legal reasons. ++ lib.optional (system != "i686-linux" && getConfig ["firefox" "enableRealPlayer"] false) RealPlayer ++ lib.optional (getConfig ["firefox" "enableMPlayer"] true) MPlayerPlugin - ++ lib.optional (supportsJDK && jrePlugin ? mozillaPlugin) jrePlugin; + ++ lib.optional (supportsJDK && getConfig ["firefox" "jre"] true && jrePlugin ? mozillaPlugin) jrePlugin; }; xara = import ../applications/graphics/xara { @@ -5434,13 +5373,12 @@ rec { base14Fonts = "${ghostscript}/share/ghostscript/fonts"; }; - xscreensaverFun = lib.sumArgs (selectVersion ../applications/graphics/xscreensaver) { + xscreensaverFun = lib.sumArgs (selectVersion ../applications/graphics/xscreensaver "5.04") { inherit stdenv fetchurl builderDefs lib pkgconfig bc perl intltool; inherit (xlibs) libX11 libXmu; }; xscreensaver = xscreensaverFun { - version = "5.04"; flags = ["GL" "gdkpixbuf" "DPMS" "gui" "jpeg"]; inherit mesa libxml2 libjpeg; inherit (gtkLibs) gtk; @@ -5479,13 +5417,12 @@ rec { # doesn't compile yet - in case someone else want's to continue .. /* qgis_svn = import ../applications/misc/qgis_svn { - inherit mkDerivationByConfiguration fetchsvn flex lib + inherit mkDerivationByConfiguration fetchsvn stdenv flex lib ncurses fetchurl perl cmake gdal geos proj x11 gsl libpng zlib sqlite glibc fontconfig freetype / * use libc from stdenv ? - to lazy now - Marc * /; inherit (xlibs) libSM libXcursor libXinerama libXrandr libXrender; inherit (xorg) libICE; - stdenv = stdenvUsingSetupNew2; qt = qt4; bison = bison23; @@ -5509,7 +5446,7 @@ rec { ### GAMES - construoFun = lib.sumArgs (selectVersion ../games/construo) { + construoFun = lib.sumArgs (selectVersion ../games/construo "0.2.2") { inherit stdenv fetchurl builderDefs zlib; inherit (xlibs) libX11 xproto; @@ -5517,7 +5454,6 @@ rec { construo = construoFun { inherit mesa freeglut; - version = "0.2.2"; } null; exult = import ../games/exult { @@ -5569,12 +5505,11 @@ rec { }; # You still can override by passing more arguments. - spaceOrbitFun = lib.sumArgs (selectVersion ../games/orbit ) { + spaceOrbitFun = lib.sumArgs (selectVersion ../games/orbit "1.01") { inherit fetchurl stdenv builderDefs mesa freeglut; inherit (gnome) esound; inherit (xlibs) libXt libX11 libXmu libXi libXext; - version = "1.01"; }; spaceOrbit = spaceOrbitFun null; @@ -5607,7 +5542,7 @@ rec { perl perlXMLParser docbook_xml_dtd_42 docbook_xml_dtd_412 gettext x11 libtiff libjpeg libpng gtkLibs xlibs bzip2 libcm python dbus_glib ncurses which libxml2Python - iconnamingutils; + iconnamingutils openssl hal samba fam; }); kdelibs = import ../desktops/kde/kdelibs { @@ -5627,8 +5562,9 @@ rec { shared_mime_info alsaLib libungif cups mesa boost gpgme gettext redland xineLib libgphoto2 djvulibre libogg flac lame libvorbis poppler readline saneBackends chmlib python libzip gmp sqlite libidn runCommand lib - openbabel ocaml facile; - stdenv = stdenvUsingSetupNew2; + openbabel ocaml facile stdenv jasper fam indilib libnova + libarchive dbus; + #flac = builtins.getAttr "1.1.2" flacAlts; cdparanoia = cdparanoiaIII; inherit (xlibs) inputproto kbproto scrnsaverproto xextproto xf86miscproto @@ -5638,7 +5574,6 @@ rec { libxkbfile libXinerama; inherit (gtkLibs) glib; qt = qt4; - dbus = dbus_alts.withX11; bison = bison23; openexr = openexr_1_6_1 ; }); @@ -5737,8 +5672,7 @@ rec { # don't have time for the source build right now # maven2 mvn_bin = import ../misc/maven/maven-2.nix { - inherit fetchurl; - stdenv = stdenvUsingSetupNew2; + inherit fetchurl stdenv; }; nix = import ../tools/package-management/nix { @@ -5873,8 +5807,7 @@ rec { }; wine = import ../misc/emulators/wine { - stdenv = overrideGCC stdenv gcc41NPTL; - inherit fetchurl flex bison mesa ncurses + inherit fetchurl stdenv flex bison mesa ncurses libpng libjpeg alsaLib lcms xlibs freetype fontconfig fontforge libxml2 libxslt openssl; }; diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix index 4963a97b91c..bb892735edd 100644 --- a/pkgs/top-level/build-for-release.nix +++ b/pkgs/top-level/build-for-release.nix @@ -240,10 +240,6 @@ let { ; }; - powerpcLinuxPkgs = {inherit (allPackages {system = "powerpc-linux";}) - aterm - ;}; - i686FreeBSDPkgs = {inherit (allPackages {system = "i686-freebsd";}) aterm autoconf