From 0618e2cd685919cb7f53aa861cd363ce6eb93a7f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 2 Feb 2009 19:00:20 +0000 Subject: [PATCH 01/59] * e2fsprogs 1.41.4. svn path=/nixpkgs/trunk/; revision=13962 --- pkgs/os-specific/linux/e2fsprogs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/e2fsprogs/default.nix b/pkgs/os-specific/linux/e2fsprogs/default.nix index c116b74a8103..c4c0b15818f7 100644 --- a/pkgs/os-specific/linux/e2fsprogs/default.nix +++ b/pkgs/os-specific/linux/e2fsprogs/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "e2fsprogs-1.41.3"; + name = "e2fsprogs-1.41.4"; src = fetchurl { - url = mirror://sourceforge/e2fsprogs/e2fsprogs-1.41.3.tar.gz; - sha256 = "0yldax5z1d1gfxpvzmr8y2z5zg5xhbi9pjjy4yw0q28dd2pfsxyf"; + url = mirror://sourceforge/e2fsprogs/e2fsprogs-1.41.4.tar.gz; + sha256 = "1p10j04gwr286qc2pjpp72k38nqk2d2n7sslwhvxgb995gp0zh9c"; }; configureFlags = From a6867fa9a3edda99b15841f41c90d61bc1c1c272 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 2 Feb 2009 19:00:30 +0000 Subject: [PATCH 02/59] * Linux 2.6.28.3. svn path=/nixpkgs/trunk/; revision=13963 --- pkgs/os-specific/linux/kernel/linux-2.6.28.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix index 4c5e0467c7ff..b9ed7d3dfa3f 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix @@ -5,11 +5,11 @@ assert !userModeLinux; import ./generic.nix ( rec { - version = "2.6.28.2"; + version = "2.6.28.3"; src = fetchurl { url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2"; - sha256 = "0fw4wv9xnajsw3prp2p79470wsflpnigflyyg21s2lfy0xn66ay8"; + sha256 = "1n4wqiyfx17dnsr696c3zanmlsy0ffhgaahiyn28cyd77v6wf2mv"; }; features = { From db6973610ca557ad6a3777cc472a9384d8cbbdb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 2 Feb 2009 21:56:29 +0000 Subject: [PATCH 03/59] Updating cromfs to the just released 1.5.7. svn path=/nixpkgs/trunk/; revision=13964 --- pkgs/tools/archivers/cromfs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/archivers/cromfs/default.nix b/pkgs/tools/archivers/cromfs/default.nix index 97293176c6ba..f243bd89d7c0 100644 --- a/pkgs/tools/archivers/cromfs/default.nix +++ b/pkgs/tools/archivers/cromfs/default.nix @@ -1,10 +1,10 @@ {stdenv, fetchurl, pkgconfig, fuse, perl}: stdenv.mkDerivation { - name = "cromfs-1.5.6.2"; + name = "cromfs-1.5.7"; src = fetchurl { - url = http://bisqwit.iki.fi/src/arch/cromfs-1.5.6.2.tar.bz2; - sha256 = "bbe5db623d3c0d2b92fe877d8c8e22a8f8d84210739313bf691d42c05406464d"; + url = http://bisqwit.iki.fi/src/arch/cromfs-1.5.7.tar.bz2; + sha256 = "7df900cd5d2656e0d2a9cdfb6da7dd194eef2e2a34537f7f69a56dc08a0c0deb"; }; patchPhase = ''sed -i 's@/bin/bash@/bin/sh@g' configure; set -x''; From 95f38fc409a0aae08a18fb7b4554275166f28e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 2 Feb 2009 21:57:18 +0000 Subject: [PATCH 04/59] Fixing the aircrack-ng build, so it doesn't depend on any profile and points, as usual, only to the store for its dependencies. svn path=/nixpkgs/trunk/; revision=13965 --- .../networking/aircrack-ng/add-paths.patch | 17 ----------------- pkgs/tools/networking/aircrack-ng/default.nix | 9 +++++---- pkgs/top-level/all-packages.nix | 10 +++------- 3 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 pkgs/tools/networking/aircrack-ng/add-paths.patch diff --git a/pkgs/tools/networking/aircrack-ng/add-paths.patch b/pkgs/tools/networking/aircrack-ng/add-paths.patch deleted file mode 100644 index 6a79484e92ce..000000000000 --- a/pkgs/tools/networking/aircrack-ng/add-paths.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/osdep/linux.c b/src/osdep/linux.c -index 9f3b1ef..ba7e584 100644 ---- a/src/osdep/linux.c -+++ b/src/osdep/linux.c -@@ -235,7 +235,11 @@ static char * wiToolsPath(const char * tool) - "/bin", - "/usr/bin", - "/usr/local/bin", -- "/tmp" -+ "/tmp", -+ "/var/run/current-system/sw/bin", -+ "/var/run/current-system/sw/sbin", -+ "/root/.nix-profile/bin", -+ "/root/.nix-profile/sbin" - }; - - nbelems = sizeof(paths) / sizeof(char *); diff --git a/pkgs/tools/networking/aircrack-ng/default.nix b/pkgs/tools/networking/aircrack-ng/default.nix index 6bedb6bc75b9..a83506efa1c1 100644 --- a/pkgs/tools/networking/aircrack-ng/default.nix +++ b/pkgs/tools/networking/aircrack-ng/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, libpcap, openssl, zlib}: +{stdenv, fetchurl, libpcap, openssl, zlib, wirelesstools}: stdenv.mkDerivation { name = "aircrack-ng-1.0-rc2"; @@ -10,9 +10,10 @@ stdenv.mkDerivation { buildInputs = [libpcap openssl zlib]; - patches = [ ./add-paths.patch ]; - - postPatch = "sed -e 's@^prefix.*@prefix = '$out@ -i common.mak"; + patchPhase = '' + sed -e 's@^prefix.*@prefix = '$out@ -i common.mak + sed -e 's@/usr/local/bin@'${wirelesstools}@ -i src/osdep/linux.c + ''; meta = { description = "Wireless encryption crackign tools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 07d0a26b91e3..11b595e601fd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -482,13 +482,9 @@ let inherit fetchurl stdenv fuse; }; - # It builds, but it has paths pointing to the default profile, - # hardcoded to /nix/var/nix/profiles/default/bin. We need to - # know its dependencies for the executable paths and stop - # using the profiles, pointing directly to the store paths needed. - #aircrackng = import ../tools/networking/aircrack-ng { - # inherit fetchurl stdenv libpcap openssl zlib; - #}; + aircrackng = import ../tools/networking/aircrack-ng { + inherit fetchurl stdenv libpcap openssl zlib wirelesstools; + }; amule = import ../tools/networking/p2p/amule { inherit fetchurl stdenv zlib perl cryptopp gettext libupnp makeWrapper; From aecd8c4415c467201512e0249379ee0383301a60 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Mon, 2 Feb 2009 23:01:10 +0000 Subject: [PATCH 05/59] bump to 2.6.4 svn path=/nixpkgs/trunk/; revision=13966 --- pkgs/applications/graphics/gimp/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 2c0e909caeab..985701967b0e 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -4,11 +4,11 @@ }: stdenv.mkDerivation { - name = "gimp-2.6.3"; + name = "gimp-2.6.4"; src = fetchurl { - url = ftp://ftp.gtk.org/pub/gimp/v2.6/gimp-2.6.3.tar.bz2; - sha256 = "1vvixi4336pjwjfx1p803jb3c12lk84adinaqvbpqdqx8xrd5r08"; + url = ftp://ftp.gtk.org/pub/gimp/v2.6/gimp-2.6.4.tar.bz2; + sha256 = "1qlpszdaskh575xjibkxvvqxmgp8j7v1i1z2dnzz6gazni2pmll6"; }; buildInputs = [ From 6ed4aa7ecb7a0c8a9c458d8a3de7e48abade5310 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Feb 2009 16:32:56 +0000 Subject: [PATCH 06/59] * Qt updated to 4.4.3 in preparation of upgrading KDE to 4.2. svn path=/nixpkgs/trunk/; revision=13974 --- pkgs/development/libraries/qt-4/default.nix | 27 ++++++++++++++----- pkgs/development/libraries/qt-4/setup-hook.sh | 7 ++--- pkgs/lib/default.nix | 4 ++- pkgs/tools/system/which/default.nix | 12 ++++++--- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/qt-4/default.nix b/pkgs/development/libraries/qt-4/default.nix index 09427e2f63b3..426be3ef38a7 100644 --- a/pkgs/development/libraries/qt-4/default.nix +++ b/pkgs/development/libraries/qt-4/default.nix @@ -1,13 +1,15 @@ args: with args; + stdenv.mkDerivation { - name = "qt-4.4.0"; + name = "qt-4.4.3"; src = fetchurl { - url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.4.0.tar.bz2; - sha256 = "871dc71c6c905212f2fea7e6598362114a3b6097c220b0b251f8d159ee7d706e"; + url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.4.3.tar.bz2; + sha256 = "1nfdf1aj6vb7qyacsnjyjxrnaf44hz7vzykf6zra2znd87pglz51"; }; - setupHook = ./setup-hook.sh; + setupHook = ./setup-hook.sh; + propagatedBuildInputs = [ libXft libXrender @@ -37,14 +39,25 @@ stdenv.mkDerivation { glib libtiff ]; + prefixKey = "-prefix "; - configureFlags = " + + configureFlags = '' -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 -qdbus -cups -glib -xfixes - -fontconfig -I${freetype}/include/freetype2"; + -fontconfig -I${freetype}/include/freetype2 + ''; - patchPhase = "sed -e 's@/bin/pwd@pwd@' -i configure; sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf"; + patchPhase = '' + substituteInPlace configure --replace /bin/pwd pwd + sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf + ''; + + meta = { + homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp; + description = "A cross-platform application framework for C++"; + }; } diff --git a/pkgs/development/libraries/qt-4/setup-hook.sh b/pkgs/development/libraries/qt-4/setup-hook.sh index c999124b8efa..36dfabb942c7 100644 --- a/pkgs/development/libraries/qt-4/setup-hook.sh +++ b/pkgs/development/libraries/qt-4/setup-hook.sh @@ -1,6 +1,7 @@ export QTDIR=@out@ + if [ -n $qt4BadIncludes ]; then - for d in @out@/include/*; do - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"; - done; + for d in @out@/include/*; do + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"; + done; fi diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index ba91271835e4..349d38f90550 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -256,6 +256,7 @@ rec { optionalString = cond: string: if cond then string else ""; + # Return the second argument if the first one is true or the empty version # of the second argument. ifEnable = cond: val: @@ -266,6 +267,7 @@ rec { else if (val == true || val == false) then false else null; + # Return a list of integers from `first' up to and including `last'. range = first: last: if builtins.lessThan last first @@ -284,7 +286,7 @@ rec { logicalOR = x: y: x || y; logicalAND = x: y: x && y; - + # Input : attrSet, [ [name default] ... ], name # Output : its value or default. getValue = attrSet: argList: name: diff --git a/pkgs/tools/system/which/default.nix b/pkgs/tools/system/which/default.nix index 7420cce0e543..3721c0f0be1a 100644 --- a/pkgs/tools/system/which/default.nix +++ b/pkgs/tools/system/which/default.nix @@ -1,12 +1,16 @@ -{stdenv, fetchurl, readline}: stdenv.mkDerivation { +{stdenv, fetchurl, readline}: + +stdenv.mkDerivation { name = "which-2.20"; + src = fetchurl { url = mirror://gnu/which/which-2.20.tar.gz; sha256 = "1y2p50zadb36izzh2zw4dm5hvdiydqf3qa88l8kav20dcmfbc5yl"; }; buildInputs = [readline]; + + meta = { + homepage = http://ftp.gnu.org/gnu/which/; + }; } - - - From b54251026ac1322d73b24a0dee5ed8b0bf4e8ac3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Feb 2009 22:13:35 +0000 Subject: [PATCH 07/59] * Enable ACL support in rsync. svn path=/nixpkgs/trunk/; revision=13976 --- .../applications/networking/sync/rsync/default.nix | 14 +++++++++++++- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index cba78189789f..cf82b517f7e4 100644 --- a/pkgs/applications/networking/sync/rsync/default.nix +++ b/pkgs/applications/networking/sync/rsync/default.nix @@ -1,9 +1,21 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl +, enableACLs ? true, acl ? null +}: + +assert enableACLs -> acl != null; stdenv.mkDerivation { name = "rsync-3.0.5"; + src = fetchurl { url = http://rsync.samba.org/ftp/rsync/src/rsync-3.0.5.tar.gz; sha256 = "1js36yv5s9dic524s7jczqk5myzp67bp24rqhbnikg6lh6pj1b20"; }; + + buildInputs = stdenv.lib.optional enableACLs acl; + + meta = { + homepage = http://samba.anu.edu.au/rsync/; + description = "A fast incremental file transfer utility"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11b595e601fd..15f9d4941310 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7939,7 +7939,7 @@ let }; rsync = import ../applications/networking/sync/rsync { - inherit fetchurl stdenv; + inherit fetchurl stdenv acl; }; rxvt = import ../applications/misc/rxvt { From f45ed4b74eafe7360b6443937d50dbd33ffbf55d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Feb 2009 22:15:02 +0000 Subject: [PATCH 08/59] * Remove obsolete comment. svn path=/nixpkgs/trunk/; revision=13977 --- pkgs/misc/cups/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index de56e336289e..2b1ff2221600 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -24,9 +24,6 @@ stdenv.mkDerivation { installFlagsArray=(BUILDROOT=$out/destdir) ''; - # !!! Ideally, we wouldn't have Samba as a dependency of CUPS. - # Rather, the backend directory should be treated as configuration - # data generated in some other Nix expression in NixOS. postInstall = '' mv $out/destdir/$out/* $out rm -rf $out/destdir From 4d68e0d17f5d0627b79940c66f8444c71106abf7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Feb 2009 08:52:43 +0000 Subject: [PATCH 09/59] * Firefox 3.0.6. svn path=/nixpkgs/trunk/; revision=13978 --- pkgs/applications/networking/browsers/firefox-3/default.nix | 6 +++--- .../networking/browsers/firefox-3/xulrunner.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox-3/default.nix b/pkgs/applications/networking/browsers/firefox-3/default.nix index 4c89505bb94d..104e0000811d 100644 --- a/pkgs/applications/networking/browsers/firefox-3/default.nix +++ b/pkgs/applications/networking/browsers/firefox-3/default.nix @@ -11,12 +11,12 @@ }: stdenv.mkDerivation { - name = "firefox-3.0.5"; + name = "firefox-3.0.6"; src = fetchurl { # Don't forget to update xulrunner.nix as well! - url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.5/source/firefox-3.0.5-source.tar.bz2; - sha1 = "f934e073efaad3d4dde847c8491fa9529564d5d2"; + url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.6/source/firefox-3.0.6-source.tar.bz2; + sha1 = "e2845c07b507308664f6f39086a050b2773382fb"; }; buildInputs = [ diff --git a/pkgs/applications/networking/browsers/firefox-3/xulrunner.nix b/pkgs/applications/networking/browsers/firefox-3/xulrunner.nix index 5dede1b723f8..8deb54829e10 100644 --- a/pkgs/applications/networking/browsers/firefox-3/xulrunner.nix +++ b/pkgs/applications/networking/browsers/firefox-3/xulrunner.nix @@ -11,7 +11,7 @@ let - version = "1.9.0.5"; # this attribute is used by other packages + version = "1.9.0.6"; # this attribute is used by other packages in @@ -19,8 +19,8 @@ stdenv.mkDerivation { name = "xulrunner-${version}"; src = fetchurl { - url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.5/source/firefox-3.0.5-source.tar.bz2; - sha1 = "f934e073efaad3d4dde847c8491fa9529564d5d2"; + url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.6/source/firefox-3.0.6-source.tar.bz2; + sha1 = "e2845c07b507308664f6f39086a050b2773382fb"; }; buildInputs = [ From b3ff9f5275911e1bf63b5ab2c55a48cdb70fc4f9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 5 Feb 2009 09:55:10 +0000 Subject: [PATCH 10/59] * Qt 4: don't install the docs. svn path=/nixpkgs/trunk/; revision=13979 --- pkgs/development/libraries/qt-4/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/qt-4/default.nix b/pkgs/development/libraries/qt-4/default.nix index 426be3ef38a7..d8f8fec2bb51 100644 --- a/pkgs/development/libraries/qt-4/default.nix +++ b/pkgs/development/libraries/qt-4/default.nix @@ -56,6 +56,13 @@ stdenv.mkDerivation { sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf ''; + # Remove the documentation: it takes up >= 130 MB, which is more + # than half of the installed size. Ideally we should put this in a + # separate package (as well as the Qt Designer). + postInstall = '' + rm -rf $out/share/doc + ''; + meta = { homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp; description = "A cross-platform application framework for C++"; From ecddd8b47288a0c6e16c4e97a0143107dc63fdc2 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 5 Feb 2009 16:50:45 +0000 Subject: [PATCH 11/59] Added syslog-ng (and the eventlog library that it depends on). svn path=/nixpkgs/trunk/; revision=13988 --- .../libraries/eventlog/default.nix | 15 +++++++++++++++ pkgs/tools/misc/syslog-ng/default.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 19 ++++++++++++++----- 3 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/libraries/eventlog/default.nix create mode 100644 pkgs/tools/misc/syslog-ng/default.nix diff --git a/pkgs/development/libraries/eventlog/default.nix b/pkgs/development/libraries/eventlog/default.nix new file mode 100644 index 000000000000..bed565a04379 --- /dev/null +++ b/pkgs/development/libraries/eventlog/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "eventlog-0.2.9"; + src = fetchurl { + url = "http://www.balabit.com/downloads/files/eventlog/0.2/eventlog_0.2.9.tar.gz"; + sha256 = "1cairmv47b66blrxwrgf4qwabfflak9b1dwkiyxnc9rj5svnq50m"; + }; + + meta = { + description = "A new API to format and send structured log messages."; + homepage = "http://www.balabit.com/support/community/products/"; + license = "BSD"; + }; +} diff --git a/pkgs/tools/misc/syslog-ng/default.nix b/pkgs/tools/misc/syslog-ng/default.nix new file mode 100644 index 000000000000..fa920120bd3b --- /dev/null +++ b/pkgs/tools/misc/syslog-ng/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl, eventlog, pkgconfig, glib}: + +stdenv.mkDerivation rec { + name = "syslog-ng-2.1.3"; + meta = { + homepage = "http://www.balabit.com/network-security/syslog-ng/"; + description = "Next-generation syslogd with advanced networking and filtering capabilities."; + license = "GPLv2"; + }; + src = fetchurl { + url = "http://www.balabit.com/downloads/files/syslog-ng/sources/2.1/src/${name}.tar.gz"; + sha256 = "1m6djxhmihmg09a90gg6mp1ghgk2zm8rcp04shh458433rbzfjb0"; + }; + buildInputs = [eventlog pkgconfig glib]; + configureFlags = "--enable-dynamic-linking"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 15f9d4941310..055f81f0a314 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -474,7 +474,7 @@ let done < graph ''; - + ### TOOLS @@ -525,6 +525,11 @@ let inherit fetchurl stdenv perl; }; + syslogng = import ../tools/misc/syslog-ng { + inherit fetchurl stdenv eventlog pkgconfig; + inherit (gtkLibs) glib; + }; + asciidoc = import ../tools/typesetting/asciidoc { inherit fetchurl stdenv bash python; }; @@ -2142,8 +2147,8 @@ let }; # new python and lib proposal - # - adding a python lib to buildinputs should be enough - # (handles .pth files by patching site.py + # - adding a python lib to buildinputs should be enough + # (handles .pth files by patching site.py # while introducing NIX_PYTHON_SITES describing list of modules) # - adding pyCheck = "import foo" test scripts to ensure libraries can be imported # - providing pythonWrapper so that you can run python and import the selected libraries @@ -2863,6 +2868,10 @@ let inherit fetchurl stdenv; }; + eventlog = import ../development/libraries/eventlog { + inherit fetchurl stdenv; + }; + facile = import ../development/libraries/facile { inherit fetchurl stdenv; # Actually, we don't need this version but we need native-code compilation @@ -5573,7 +5582,7 @@ let url = mirror://cpan/authors/id/M/MS/MSERGEANT/XML-Parser-2.36.tar.gz; sha256 = "0gyp5qfbflhkin1zv8l6wlkjwfjvsf45a3py4vc6ni82fj32kmcz"; }; - makeMakerFlags = "EXPATLIBPATH=${expat}/lib EXPATINCPATH=${expat}/include"; + makeMakerFlags = "EXPATLIBPATH=${expat}/lib EXPATINCPATH=${expat}/include"; }; perlXMLRegExp = buildPerlPackage { @@ -8524,7 +8533,7 @@ let }; xboard = builderDefsPackage (import ../games/xboard) { - inherit (xlibs) libX11 xproto libXt libXaw libSM + inherit (xlibs) libX11 xproto libXt libXaw libSM libICE libXmu libXext; inherit gnuchess; }; From e3ef8055008ece0ad9f9d314d510beee5684cf30 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 5 Feb 2009 23:44:52 +0000 Subject: [PATCH 12/59] added pointer to the package classification policy maintainer document svn path=/nixpkgs/trunk/; revision=13992 --- pkgs/top-level/all-packages.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 055f81f0a314..d5c22af7ceec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2,7 +2,10 @@ imports the functions that build the various packages, and calls them with appropriate arguments. The result is a set of all the packages in the Nix Packages collection for some particular - platform. */ + platform. + + You want to get to know where to add a new package ? + Have a look at nixpkgs/maintainers/docs/classification.txt */ { # The system (e.g., `i686-linux') for which to build the packages. From c4c1aa0a8a84e3f101dd423ac31685d65f000c02 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 6 Feb 2009 03:14:30 +0000 Subject: [PATCH 13/59] added thinkingRock svn path=/nixpkgs/trunk/; revision=13993 --- .../misc/thinking-rock/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/misc/thinking-rock/default.nix diff --git a/pkgs/applications/misc/thinking-rock/default.nix b/pkgs/applications/misc/thinking-rock/default.nix new file mode 100644 index 000000000000..721f3f4e74fc --- /dev/null +++ b/pkgs/applications/misc/thinking-rock/default.nix @@ -0,0 +1,38 @@ +args: +args.stdenv.mkDerivation { + name = "thinkingrock-2.0.1-binary"; + + src = args.fetchurl { + url = mirror://sourceforge.net/thinkingrock/tr-2.0.1.tar.gz; + sha256 = "1fsanxh0li8yqsspagx1w1ykmvfnm6h44i6gd02v05abx8q25jk1"; + }; + + /* it would be a really bad idea to put thinkingrock tr executable in PATH! + the tr.sh script does use the coreutils tr itself + That's why I've renamed the wrapper and called it thinkingrock + However you may not rename the bin/tr script cause it will notice and throw an + "java.lang.IllegalArgumentException: Malformed branding token: thinkingrock" + exception. I hope that's fine + */ + + buildPhase = '' + # only keep /bin/tr + ls -1 bin/* | grep -ve 'bin/tr''$' | xargs rm + # don't keep the other .exe file either + find . -iname "*.exe" | xargs -n1 rm + ensureDir $out/{nix-support/tr-files,bin} + cp -r . $out/nix-support/tr-files + cat >> $out/bin/thinkingrock << EOF + #!/bin/sh + exec $out/nix-support/tr-files/bin/tr "$@" + EOF + chmod +x $out/bin/thinkingrock + ''; + installPhase = ":"; + + meta = { + description = "task managing system"; + homepage = http://www.thinkingrock.com.au/; + license = "CDDL"; # Common Development and Distribution License + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5c22af7ceec..b4cdcb17e419 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8105,6 +8105,10 @@ let withKde = pkgs.getConfig ["taskJuggler" "kde"] false; }; + thinkingRock = import ../applications/misc/thinking-rock { + inherit fetchurl stdenv; + }; + thunderbird = import ../applications/networking/mailreaders/thunderbird-2.x { inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo; inherit (gtkLibs) gtk; From f8a207e806894d11ce004ab07930c46a86bc5191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 6 Feb 2009 08:43:31 +0000 Subject: [PATCH 14/59] GNU Emacs 23.x update (development snapshot). svn path=/nixpkgs/trunk/; revision=13994 --- .../applications/editors/emacs-unicode/builder.sh | 2 +- .../editors/emacs-unicode/default.nix | 15 ++++++++------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/emacs-unicode/builder.sh b/pkgs/applications/editors/emacs-unicode/builder.sh index 03dc2ac70beb..953965716b70 100644 --- a/pkgs/applications/editors/emacs-unicode/builder.sh +++ b/pkgs/applications/editors/emacs-unicode/builder.sh @@ -12,7 +12,7 @@ preConfigure() { --replace /usr/lib/crtn.o $libc/lib/crtn.o done - for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in ./admin/unidata/Makefile; do + for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do substituteInPlace $i --replace /bin/pwd pwd done } diff --git a/pkgs/applications/editors/emacs-unicode/default.nix b/pkgs/applications/editors/emacs-unicode/default.nix index 7a0895b10318..169fe6e0b304 100644 --- a/pkgs/applications/editors/emacs-unicode/default.nix +++ b/pkgs/applications/editors/emacs-unicode/default.nix @@ -5,7 +5,7 @@ , xftSupport ? false , stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null , pkgconfig ? null, gtk ? null, libXft ? null -, libpng, libjpeg, libungif, libtiff +, libpng, libjpeg, libungif, libtiff, texinfo }: assert xawSupport -> libXaw != null; @@ -14,14 +14,15 @@ assert xaw3dSupport -> Xaw3d != null; assert gtkGUI -> pkgconfig != null && gtk != null; assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug +let date = "20080228"; in stdenv.mkDerivation { - name = "emacs-snapshot-23.0.0.1-pre20070705"; + name = "emacs-snapshot-23-${date}"; builder = ./builder.sh; src = fetchurl { - url = http://debs.peadrop.com/pool/edgy/backports/emacs-snapshot_20070705.orig.tar.gz; - sha256 = "1blybacpsxha2v24kj482wl3g1z93rwddfc8rsqsk6dr6f5kdj5q"; + url = "http://ppa.launchpad.net/avassalotti/ubuntu/pool/main/e/emacs-snapshot/emacs-snapshot_${date}.orig.tar.gz"; + sha256 = "1cix1qjrynidvdyww3g8fm1wyggc82qjxbfbv3rx630szm1v6bm7"; }; # patches = [ @@ -29,7 +30,7 @@ stdenv.mkDerivation { # ]; buildInputs = [ - ncurses x11 + ncurses x11 texinfo (if xawSupport then libXaw else null) (if xpmSupport then libXpm else null) (if xaw3dSupport then Xaw3d else null) @@ -39,12 +40,12 @@ stdenv.mkDerivation { ++ (if xftSupport then [libXft] else []); configureFlags = " - ${if gtkGUI then "--with-gtk --enable-font-backend --with-xft" else ""} + ${if gtkGUI then "--with-x-toolkit=gtk --enable-font-backend --with-xft" else ""} "; meta = { description = "Emacs with Unicode, GTK and Xft support (23.x alpha)"; homepage = http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs; - license = "GPL"; + license = "GPLv3+"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4cdcb17e419..156c86df257d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7349,7 +7349,7 @@ let emacsUnicode = lowPrio (import ../applications/editors/emacs-unicode { inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d - libpng libjpeg libungif libtiff; + libpng libjpeg libungif libtiff texinfo; inherit (xlibs) libXaw libXpm libXft; inherit (gtkLibs) gtk; xawSupport = getPkgConfig "emacs" "xawSupport" false; From c84c92d3e8f96f8feda659a7d14f86e1053b2b3d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 6 Feb 2009 09:48:20 +0000 Subject: [PATCH 15/59] ftp://oss.sgi.com/projects/xfs/cmd_tars/attr_2.4.41-1.tar.gz no longer exists. There is a newer version on the server, but it cannot be downloaded, apparently because of misconfigured permissions. svn path=/nixpkgs/trunk/; revision=13995 --- pkgs/development/libraries/attr/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index af30d08d7d7e..5b8aa839cf87 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -4,13 +4,15 @@ stdenv.mkDerivation { name = "attr-2.4.41"; src = fetchurl { - url = ftp://oss.sgi.com/projects/xfs/cmd_tars/attr_2.4.41-1.tar.gz; + # The file cannot be downloaded from sgi.com. + #url = ftp://oss.sgi.com/projects/xfs/cmd_tars/attr_2.4.41-1.tar.gz; + url = "http://gentoo.chem.wisc.edu/gentoo/distfiles/attr_2.4.41-1.tar.gz"; sha256 = "0dc286g8vr402aca6wg945sdm92bys8a142vrkwx6bkjz4bwz6gp"; }; buildInputs = [libtool gettext]; - + configureFlags = "MAKE=make LIBTOOL=libtool MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ECHO=echo SED=sed AWK=gawk"; - + installTargets = "install install-lib install-dev"; } From 0d64423f6071c2c9873c4068034d335c7899c2cf Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 6 Feb 2009 09:52:27 +0000 Subject: [PATCH 16/59] ftp://oss.sgi.com/projects/xfs/cmd_tars/acl_2.2.47-1.tar.gz no longer exists. There is a newer version on the server, but it cannot be downloaded, apparently because of misconfigured permissions. svn path=/nixpkgs/trunk/; revision=13996 --- pkgs/development/libraries/acl/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/acl/default.nix b/pkgs/development/libraries/acl/default.nix index bbba61c1de6e..342c07a1b3e6 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -4,10 +4,12 @@ stdenv.mkDerivation { name = "acl-2.2.47"; src = fetchurl { - url = ftp://oss.sgi.com/projects/xfs/cmd_tars/acl_2.2.47-1.tar.gz; + # The file cannot be downloaded from sgi.com. + #url = ftp://oss.sgi.com/projects/xfs/cmd_tars/acl_2.2.47-1.tar.gz; + url = "http://gentoo.chem.wisc.edu/gentoo/distfiles/acl_2.2.47-1.tar.gz"; sha256 = "1j39g62fki0iyji9s62slgwdfskpkqy7rmjlqcnmsvsnxbxhc294"; }; - + buildInputs = [gettext attr libtool]; configureFlags = "MAKE=make LIBTOOL=libtool MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ZIP=gzip ECHO=echo SED=sed AWK=gawk"; From b7f9c339895f1341c81c2adbb31b9ac474ef40cd Mon Sep 17 00:00:00 2001 From: Tobias Hammerschmidt Date: Fri, 6 Feb 2009 20:18:08 +0000 Subject: [PATCH 17/59] version bump svn path=/nixpkgs/trunk/; revision=13999 --- pkgs/misc/ntfs-3g/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/ntfs-3g/default.nix b/pkgs/misc/ntfs-3g/default.nix index 6edaf02084e5..ea2b60a613d7 100644 --- a/pkgs/misc/ntfs-3g/default.nix +++ b/pkgs/misc/ntfs-3g/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "ntfs-3g"; - version = "1.5012"; + version = "2009.1.1"; name = "${pname}-${version}"; src = fetchurl { url = "${meta.homepage}/${name}.tgz"; - sha256 = "e79102fdb5948f209d25432f8f5127965877fe47bed68b9270b23fc1d187735a"; + sha256 = "0e02ff891645658c1801ba7d665c0ff3a4231e5570b974a803ffc2974ef68e45"; }; preConfigure = '' From f529bd70a1c3b4ba968497b2a51e9a160f0fe5d0 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sat, 7 Feb 2009 16:02:50 +0000 Subject: [PATCH 18/59] Carrier update svn path=/nixpkgs/trunk/; revision=14002 --- .../instant-messengers/carrier/2.5.0.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix diff --git a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix new file mode 100644 index 000000000000..db120924a9cb --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix @@ -0,0 +1,54 @@ +args : with args; +/* + arguments: all buildInputs + optional: purple2Source: purple-2 source - place to copy libpurple from + (to use a fresher pidgin build) +*/ +let + externalPurple2 = (lib.getAttr ["purple2Source"] null args) != null; +in +rec { + src = fetchurl { + url = http://downloads.sourceforge.net/funpidgin/carrier-2.5.0.tar.bz2; + sha256 = "0m80s7hnvz5vc2dy3xiy1zfb6incmb7p28zahzxdif2vz44riz28"; + }; + + buildInputs = [gtkspell aspell + GStreamer startupnotification + libxml2 openssl nss + libXScrnSaver ncurses scrnsaverproto + libX11 xproto kbproto GConf avahi + dbus dbus_glib glib python + autoconf libtool automake]; + + propagatedBuildInputs = [ + pkgconfig gtk perl perlXMLParser gettext + ]; + + configureFlags="--with-nspr-includes=${nss}/include/nspr" + + " --with-nspr-libs=${nss}/lib --with-nss-includes=${nss}/include/nss" + + " --with-nss-libs=${nss}/lib --with-ncurses-headers=${ncurses}/include" + + " --enable-screensaver --disable-meanwhile --disable-nm --disable-tcl"; + + preBuild = FullDepEntry ('' + export echo=echo + '') []; + + /* doConfigure should be specified separately */ + phaseNames = ["doConfigure" "preBuild" "doMakeInstall"] + ++ (lib.optional externalPurple2 "postInstall") + ; + + name = "carrier-" + version; + meta = { + description = "Carrier - PidginIM GUI fork with user-friendly development model"; + homepage = http://funpidgin.sf.net; + }; +} // (if externalPurple2 then { + postInstall = FullDepEntry ('' + ensureDir $out/lib/purple-2 + cp ${args.purple2Source}/lib/purple-2/* $out/lib/purple-2/ + '') ["minInit" "defEnsureDir"]; } + else {}) + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 156c86df257d..94937b61b16e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7106,7 +7106,7 @@ let inherit fetchurl stdenv ncurses; }; - carrier = builderDefsPackage (selectVersion ../applications/networking/instant-messengers/carrier "2.4.2") { + carrier = builderDefsPackage (selectVersion ../applications/networking/instant-messengers/carrier "2.5.0") { inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss gtkspell aspell gettext ncurses avahi dbus dbus_glib python libtool automake autoconf; From b47bdfc6f7296afa49c0e26ff0fd2d3eb0d8d976 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 8 Feb 2009 13:22:26 +0000 Subject: [PATCH 19/59] kqemu seems to need it on most kernels svn path=/nixpkgs/trunk/; revision=14003 --- pkgs/os-specific/linux/kqemu/1.3.0pre11.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kqemu/1.3.0pre11.nix b/pkgs/os-specific/linux/kqemu/1.3.0pre11.nix index 9e56e96f2970..54f197f3b5a2 100644 --- a/pkgs/os-specific/linux/kqemu/1.3.0pre11.nix +++ b/pkgs/os-specific/linux/kqemu/1.3.0pre11.nix @@ -16,6 +16,7 @@ rec { sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh sed -e '/depmod/d' -i install.sh cat install.sh + sed -e '/linux\/ioctl.h/a#include ' -i kqemu-linux.c '') ["minInit" "doUnpack"]; phaseNames = ["preConfigure" "doConfigure" "debugStep" "doMakeInstall"]; From 97d0f21d03296725c766fa55e2d47b1e8ba4ea17 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 8 Feb 2009 14:17:05 +0000 Subject: [PATCH 20/59] Added XaoS fractal viewer svn path=/nixpkgs/trunk/; revision=14004 --- pkgs/applications/graphics/xaos/default.nix | 32 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/applications/graphics/xaos/default.nix diff --git a/pkgs/applications/graphics/xaos/default.nix b/pkgs/applications/graphics/xaos/default.nix new file mode 100644 index 000000000000..3ee0ba8db069 --- /dev/null +++ b/pkgs/applications/graphics/xaos/default.nix @@ -0,0 +1,32 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.getAttr ["version"] "3.4" a; + buildInputs = with a; [ + aalib gsl libpng libX11 xproto libXext xextproto + libXt zlib gettext intltool perl + ]; +in +rec { + src = fetchurl { + url = "http://prdownloads.sourceforge.net/xaos/XaoS-${version}.tar.gz"; + sha256 = "004cdb0xv14shyixs79bf95s52s7aidr5bqfn9wb49gpasrsknrc"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"]; + + preConfigure = a.FullDepEntry ('' + sed -e s@/usr/@"$out/"@g -i configure $(find . -name 'Makefile*') + ensureDir $out/share/locale + '') ["doUnpack" "minInit" "defEnsureDir"]; + + name = "xaos-" + version; + meta = { + description = "XaoS - fractal viewer"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 94937b61b16e..e55dbe35ef70 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8250,6 +8250,11 @@ let inherit (xlibs) libX11 xproto xextproto libXext libXrandr randrproto; }; + xaos = builderDefsPackage (import ../applications/graphics/xaos) { + inherit (xlibs) libXt libX11 libXext xextproto xproto; + inherit gsl aalib zlib libpng intltool gettext perl; + }; + xara = import ../applications/graphics/xara { inherit fetchurl stdenv autoconf automake libtool gettext cvs wxGTK pkgconfig libxml2 zip libpng libjpeg shebangfix perl freetype; From 863e9181d5541c15b886ffbcc75465ceaef2ceec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Feb 2009 16:27:57 +0000 Subject: [PATCH 21/59] Adding vtk-5.2.1, The Visualization Toolkit. svn path=/nixpkgs/trunk/; revision=14006 --- pkgs/development/libraries/vtk/default.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/libraries/vtk/default.nix diff --git a/pkgs/development/libraries/vtk/default.nix b/pkgs/development/libraries/vtk/default.nix new file mode 100644 index 000000000000..cb9853ebbbc6 --- /dev/null +++ b/pkgs/development/libraries/vtk/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl, cmake, mesa, libX11, xproto, libXt }: + +stdenv.mkDerivation { + name = "vtk-5.2.1"; + src = fetchurl { + url = http://www.vtk.org/files/release/5.2/vtk-5.2.1.tar.gz; + sha256 = "c81521b3767a044745336212cbde500d6e97a1f8ba647bc590857e36f57003bb"; + }; + buildInputs = [ cmake mesa libX11 xproto libXt ]; + + meta = { + description = "Open source libraries for 3D computer graphics, image processing and visualization"; + homepage = http://www.vtk.org/; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e55dbe35ef70..94cf9c68413b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3879,6 +3879,11 @@ let inherit postgresql mysql sqlite; }); + vtk = import /root/nix/vtk/default.nix { + inherit stdenv fetchurl cmake mesa; + inherit (xlibs) libX11 xproto libXt; + }; + vxl = import ../development/libraries/vxl { inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg; }; From 0f6908ca75c95a3ae807a9fcecb39eabeaa1c8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Feb 2009 16:28:12 +0000 Subject: [PATCH 22/59] Updating dosfstools to 3.01. Removing selectVersion. (3.00deb urls weren't working) svn path=/nixpkgs/trunk/; revision=14007 --- pkgs/tools/misc/dosfstools/3.00deb.nix | 34 -------------------------- pkgs/tools/misc/dosfstools/default.nix | 24 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 25 insertions(+), 35 deletions(-) delete mode 100644 pkgs/tools/misc/dosfstools/3.00deb.nix create mode 100644 pkgs/tools/misc/dosfstools/default.nix diff --git a/pkgs/tools/misc/dosfstools/3.00deb.nix b/pkgs/tools/misc/dosfstools/3.00deb.nix deleted file mode 100644 index 59c386da2b2c..000000000000 --- a/pkgs/tools/misc/dosfstools/3.00deb.nix +++ /dev/null @@ -1,34 +0,0 @@ -args : with args; with builderDefs; - let patch = - fetchurl { - url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_3.0.0-1.diff.gz; - sha256 = "5ecab7e9cf213b0cc7406649ca59edb9ec6daad2fa454bce423ccb1744fc1336"; - }; - localDefs = builderDefs.passthru.function (rec { - src = /* put a fetchurl here */ - fetchurl { - url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_3.0.0.orig.tar.gz; - sha256 = "46125aafff40e8215e6aa30087c6c72a82654c8f5fca4878adc1fa26342eab58"; - }; - preBuild = FullDepEntry ('' - gunzip < ${patch} | patch -Np1 - '')["minInit" "doUnpack"]; - - buildInputs = []; - configureFlags = []; - makeFlags = " PREFIX=$out "; - }); - in with localDefs; -stdenv.mkDerivation rec { - name = "dosfstools-"+version; - builder = writeScript (name + "-builder") - (textClosure localDefs - [preBuild "doMakeInstall" doForceShare doPropagate]); - meta = { - description = " - Dosfstools - utilities for vfat file system. -"; - homepage = "http://sixpak.org/dosfstools/dosfstools-2.8vb2.tar.gz"; - inherit src; - }; -} diff --git a/pkgs/tools/misc/dosfstools/default.nix b/pkgs/tools/misc/dosfstools/default.nix new file mode 100644 index 000000000000..43691c227143 --- /dev/null +++ b/pkgs/tools/misc/dosfstools/default.nix @@ -0,0 +1,24 @@ +args : with args; with builderDefs; + let localDefs = builderDefs.passthru.function (rec { + src = /* put a fetchurl here */ + fetchurl { + url = http://www.daniel-baumann.ch/software/dosfstools/dosfstools-3.0.1.tar.bz2; + sha256 = "7fab0de42391277028071d01ff4da83ff9a399408ccf29958cdee62ffe746d45"; + }; + + buildInputs = []; + configureFlags = []; + makeFlags = " PREFIX=$out "; + }); + in with localDefs; +stdenv.mkDerivation rec { + name = "dosfstools-3.01"; + builder = writeScript (name + "-builder") + (textClosure localDefs + ["doMakeInstall" doForceShare doPropagate]); + meta = { + description = "Dosfstools - utilities for vfat file system."; + homepage = "http://www.daniel-baumann.ch/software/dosfstools/"; + inherit src; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 94cf9c68413b..2c84227a0e09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -683,7 +683,7 @@ let gnused groff libxml2 libxslt makeWrapper; }; - dosfstools = composedArgsAndFun (selectVersion ../tools/misc/dosfstools "3.00deb") { + dosfstools = composedArgsAndFun (import ../tools/misc/dosfstools) { inherit builderDefs; }; From 264a6c709a8525c9cfd404c76b5dd79fa422ab4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Feb 2009 16:28:31 +0000 Subject: [PATCH 23/59] Adding alliance 5.0 svn path=/nixpkgs/trunk/; revision=14008 --- .../science/electronics/alliance/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/applications/science/electronics/alliance/default.nix diff --git a/pkgs/applications/science/electronics/alliance/default.nix b/pkgs/applications/science/electronics/alliance/default.nix new file mode 100644 index 000000000000..90fd5901cac7 --- /dev/null +++ b/pkgs/applications/science/electronics/alliance/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, xproto, motif, libX11, libXt, libXpm, bison, flex}: + +stdenv.mkDerivation { + name = "alliance-5.0-20070718"; + + src = fetchurl { + url = http://www-asim.lip6.fr/pub/alliance/distribution/5.0/alliance-5.0-20070718.tar.gz; + sha256 = "4e17c8f9f4d344061166856d47e58527c6ae870fda0c73b5ba0200967d23af9f"; + }; + + buildInputs = [ xproto motif xproto libX11 libXt libXpm bison flex]; + + patchPhase = '' + sed -i -e \ + "s/private: static void operator delete/public: static void operator delete/" \ + nero/src/ADefs.h + ''; + + meta = { + description = "Complete set of free CAD tools and portable libraries for VLSI design."; + homepage = http://www-asim.lip6.fr/recherche/alliance/; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2c84227a0e09..825cb6a801a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8635,6 +8635,12 @@ let ### SCIENCE/BIOLOGY + alliance = import ../applications/science/electronics/alliance { + inherit fetchurl stdenv bison flex; + inherit (xlibs) xproto libX11 libXt libXpm; + motif = lesstif; + }; + arb = import ../applications/science/biology/arb { inherit fetchurl stdenv readline libpng zlib x11 lesstif93 freeglut perl; inherit (xlibs) libXpm libXaw libX11 libXext libXt; From d20bb02310bdad19e217ecc42fe7715b6bbe46df Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 8 Feb 2009 17:23:22 +0000 Subject: [PATCH 24/59] Added mozplugger - an universal launching plugin for Mozilla programs svn path=/nixpkgs/trunk/; revision=14009 --- .../mozilla-plugins/mozplugger/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix new file mode 100644 index 000000000000..80a95e075357 --- /dev/null +++ b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix @@ -0,0 +1,36 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.getAttr ["version"] "1.12.0" a; + buildInputs = with a; [ + firefox libX11 xproto + ]; +in +rec { + src = fetchurl { + url = "http://mozplugger.mozdev.org/files/mozplugger-${version}.tar.gz"; + sha256 = "1vpggfmbv4h3srk80rgidd020i03hrkpb7cfxkwagkcd0zcal4hk"; + }; + + inherit buildInputs; + configureFlags = []; + makeFlags = ["linux" "prefix=" "root=$out"]; + + preBuild = a.FullDepEntry('' + sed -e s@/usr/@"$out/"@g -i mozplugger.c + '') ["doUnpack" "minInit"]; + + postInstall = a.FullDepEntry('' + ensureDir $out/share/${name}/plugin + ln -s $out/lib/mozilla/plugins/mozplugger.so $out/share/${name}/plugin + '') ["doMakeInstall" "minInit" "defEnsureDir"]; + + /* doConfigure should be removed if not needed */ + phaseNames = ["preBuild" "doMakeInstall" "postInstall"]; + + name = "mozplugger-" + version; + meta = { + description = "Mozilla plugin for launching external program for handling in-page objects"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 825cb6a801a0..fe11548cf3fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7770,6 +7770,11 @@ let inherit (xlibs) libXi; }; + mozplugger = builderDefsPackage (import ../applications/networking/browsers/mozilla-plugins/mozplugger) { + inherit firefox; + inherit (xlibs) libX11 xproto; + }; + mpg321 = import ../applications/audio/mpg321 { inherit stdenv fetchurl libao libmad libid3tag zlib; }; From ee9a5c1c89836cacfc6b9c8167cbe8e4907993e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Feb 2009 23:29:27 +0000 Subject: [PATCH 25/59] Fixing a nix import path I commited without enough care. svn path=/nixpkgs/trunk/; revision=14010 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe11548cf3fc..4d43baef412a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3879,7 +3879,7 @@ let inherit postgresql mysql sqlite; }); - vtk = import /root/nix/vtk/default.nix { + vtk = import ../development/libraries/vtk { inherit stdenv fetchurl cmake mesa; inherit (xlibs) libX11 xproto libXt; }; From 8eb6ecb1ec98423bd859c4f794ae15badfcc1997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 9 Feb 2009 08:34:25 +0000 Subject: [PATCH 26/59] Add EIEIO, a CLOS clone for Emacs. svn path=/nixpkgs/trunk/; revision=14011 --- .../editors/emacs-modes/eieio/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/eieio/default.nix diff --git a/pkgs/applications/editors/emacs-modes/eieio/default.nix b/pkgs/applications/editors/emacs-modes/eieio/default.nix new file mode 100644 index 000000000000..bbe4c6085acb --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/eieio/default.nix @@ -0,0 +1,38 @@ +{ fetchurl, stdenv, emacs }: + +stdenv.mkDerivation rec { + name = "eieio-0.17"; + + src = fetchurl { + url = "mirror://sourceforge/cedet/${name}.tar.gz"; + sha256 = "0n31z9d47ar10g9xrnzz3nl4pmixw1nkk0kpxaillls7xvjd1zy2"; + }; + + buildInputs = [ emacs ]; + + doCheck = false; + checkPhase = "make test"; + + installPhase = '' + ensureDir "$out/share/emacs/site-lisp" + cp -v *.el *.elc "$out/share/emacs/site-lisp" + chmod a-x "$out/share/emacs/site-lisp/"* + + ensureDir "$out/share/info" + cp -v *.info* "$out/share/info" + ''; + + meta = { + description = "EIEIO: Enhanced Implementation of Emacs Interpreted Objects"; + + longDescription = '' + EIEIO is a package which implements a CLOS subset for Emacs. It + includes examples which can draw simple tree graphs, and bar + charts. + ''; + + license = "GPLv2+"; + + homepage = http://cedet.sourceforge.net/; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d43baef412a..fe3a51f8e2cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -691,6 +691,10 @@ let inherit fetchurl stdenv cdrkit m4; }; + eieio = import ../applications/editors/emacs-modes/eieio { + inherit fetchurl stdenv emacs; + }; + enscript = import ../tools/text/enscript { inherit fetchurl stdenv; }; From eebb6f106c445c5661975a60a55b07ad91c6fa47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 9 Feb 2009 08:48:49 +0000 Subject: [PATCH 27/59] Add Semantic, a parser generator for Emacs. svn path=/nixpkgs/trunk/; revision=14012 --- .../editors/emacs-modes/semantic/default.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 54 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/semantic/default.nix diff --git a/pkgs/applications/editors/emacs-modes/semantic/default.nix b/pkgs/applications/editors/emacs-modes/semantic/default.nix new file mode 100644 index 000000000000..dfb1902c1c24 --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/semantic/default.nix @@ -0,0 +1,50 @@ +{ fetchurl, stdenv, emacs, eieio }: + +stdenv.mkDerivation rec { + name = "semantic-1.4.4"; + + src = fetchurl { + url = "mirror://sourceforge/cedet/${name}.tar.gz"; + sha256 = "0j50dqdy5bl35vqfbgxp93grs11llg9i4398044br73lvvif9n5f"; + }; + + buildInputs = [ emacs eieio ]; + + doCheck = true; + checkPhase = "make Tests"; + + preConfigure = '' + sed -i "Makefile" -es'|^LOADPATH[[:blank:]]*=.*$|LOADPATH = ${eieio}/share/emacs/site-lisp|g' + ''; + + installPhase = '' + ensureDir "$out/share/emacs/site-lisp" + cp -v *.el *.elc "$out/share/emacs/site-lisp" + chmod a-x "$out/share/emacs/site-lisp/"* + + ensureDir "$out/share/info" + cp -v *.info* "$out/share/info" + ''; + + meta = { + description = "Semantic, infrastructure for parser based text analysis in Emacs"; + + longDescription = '' + Semantic is an infrastructure for parser based text analysis in + Emacs. It is a lexer, parser-generator, and parser. It is + written in Emacs Lisp and is customized to the way Emacs thinks + about language files, and is optimized to use Emacs' parsing + capabilities. + + Semantic's goal is to provide an intermediate API for authors of + language agnostic tools who want to deal with languages in a + generic way. It also provides a simple way for Mode Authors who + are experts in their language, to provide a parser for those + tool authors, without knowing anything about those tools. + ''; + + license = "GPLv2+"; + + homepage = http://cedet.sourceforge.net/; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe3a51f8e2cb..a948c7440656 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1226,6 +1226,10 @@ let makeFlags = [" CFLAGS+=-DNOMEMLOCK "]; }); + semantic = import ../applications/editors/emacs-modes/semantic { + inherit fetchurl stdenv emacs eieio; + }; + sharutils = selectVersion ../tools/archivers/sharutils "4.6.3" { inherit fetchurl stdenv; }; From 599015e8b071bc8d38779fbfc37961db1ac0f464 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Feb 2009 16:51:03 +0000 Subject: [PATCH 28/59] * Split lib/default.nix into several files, as it had become a big mess. Also cleaned up some functions: - foldl appeared broken (it recursively called fold). - Renamed logicalAND/logicalOR to and/or. - Removed listOfListsToAttrs, eqStrings: obsolete. - Removed isInList, which does the same thing as elem. - stringToCharacters: don't return a "" at the end of the list. - Renamed concatList to concat, as concatList (singular) is a misnomer: it takes two lists. Likewise, renamed mergeAttr to mergeAttrs. misc.nix still contains a lot of stuff that should be refactored and moved to other files. svn path=/nixpkgs/trunk/; revision=14013 --- pkgs/applications/audio/flac/default.nix | 35 +- pkgs/development/compilers/ocaml/default.nix | 11 +- .../interpreters/python-new/2.5/default.nix | 6 +- pkgs/lib/attrsets.nix | 22 + pkgs/lib/debug.nix | 15 + pkgs/lib/default.nix | 884 +----------------- pkgs/lib/lists.nix | 118 +++ pkgs/lib/misc.nix | 385 ++++++++ pkgs/lib/options.nix | 267 ++++++ pkgs/lib/sources.nix | 29 + pkgs/lib/strings.nix | 85 ++ pkgs/lib/trivial.nix | 18 + pkgs/top-level/all-packages.nix | 7 +- pkgs/top-level/builder-defs.nix | 2 + 14 files changed, 982 insertions(+), 902 deletions(-) create mode 100644 pkgs/lib/attrsets.nix create mode 100644 pkgs/lib/debug.nix create mode 100644 pkgs/lib/lists.nix create mode 100644 pkgs/lib/misc.nix create mode 100644 pkgs/lib/options.nix create mode 100644 pkgs/lib/sources.nix create mode 100644 pkgs/lib/strings.nix create mode 100644 pkgs/lib/trivial.nix diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 6095e59fa07a..ad9d3356cdaf 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -1,19 +1,16 @@ -args: with args; -let - flacFun = version: hash: - stdenv.mkDerivation rec { - name = "flac-${version}"; - src = fetchurl ({ - url = "http://downloads.xiph.org/releases/flac/${name}.tar.gz"; - } // hash); - buildInputs = [libogg]; - meta = { - homepage = http://flac.sourceforge.net; - }; - }; -in -stdenv.lib.listOfListsToAttrs [ - [ "default" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ] - [ "1.2.1" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ] - [ "1.1.2" (flacFun "1.1.2" { md5 = "2bfc127cdda02834d0491ab531a20960"; }) ] -] +{stdenv, fetchurl, libogg}: + +stdenv.mkDerivation rec { + name = "flac-1.2.1"; + + src = fetchurl { + url = mirror://sourceforge/flac/flac-1.2.1.tar.gz; + sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; + }; + + buildInputs = [libogg]; + + meta = { + homepage = http://flac.sourceforge.net; + }; +} diff --git a/pkgs/development/compilers/ocaml/default.nix b/pkgs/development/compilers/ocaml/default.nix index 837a685198bd..f3ef70b2a558 100644 --- a/pkgs/development/compilers/ocaml/default.nix +++ b/pkgs/development/compilers/ocaml/default.nix @@ -1,7 +1,8 @@ args: -args.stdenv.lib.listOfListsToAttrs [ - [ "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) ] - [ "default" (import ./3.09.1.nix args) ] + +builtins.listToAttrs [ + { name = "3.08.0"; value = import ./3.08.0.nix args; } + { name = "3.09.1"; value = import ./3.09.1.nix args; } + { name = "3.10.0"; value = import ./3.10.0.nix args; } + { name = "default"; value = import ./3.09.1.nix args; } ] diff --git a/pkgs/development/interpreters/python-new/2.5/default.nix b/pkgs/development/interpreters/python-new/2.5/default.nix index dfe86683b506..1c2f22f66bbc 100644 --- a/pkgs/development/interpreters/python-new/2.5/default.nix +++ b/pkgs/development/interpreters/python-new/2.5/default.nix @@ -124,7 +124,7 @@ in buildPhase = ''python setup.py $setupFlags build''; installPhase = ''python setup.py $setupFlags install --prefix=$out''; mergeAttrBy = { - setupFlags = lib.concatList; + setupFlags = lib.concat; }; }; @@ -219,8 +219,8 @@ in done ''; mergeAttrBy = { - phases = lib.concatList; - pySrcs = lib.concatList; + phases = lib.concat; + pySrcs = lib.concat; pyCheck = x : y : "${x}\n${y}"; }; } diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix new file mode 100644 index 000000000000..201fb91bd000 --- /dev/null +++ b/pkgs/lib/attrsets.nix @@ -0,0 +1,22 @@ +# Operations on attribute sets. + +with { inherit (builtins) head tail; }; + +rec { + inherit (builtins) attrNames listToAttrs hasAttr isAttrs; + + + # Return an attribute from nested attribute sets. For instance ["x" + # "y"] applied to some set e returns e.x.y, if it exists. The + # default value is returned otherwise. !!! there is also + # builtins.getAttr (is there a better name for this function?) + getAttr = attrPath: default: e: + let attr = head attrPath; + in + if attrPath == [] then e + else if builtins ? hasAttr && hasAttr attr e + then getAttr (tail attrPath) default (builtins.getAttr attr e) + else default; + + +} \ No newline at end of file diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix new file mode 100644 index 000000000000..23d1a85c72fd --- /dev/null +++ b/pkgs/lib/debug.nix @@ -0,0 +1,15 @@ +rec { + + + # Wrapper aroung the primop `addErrorContext', which shouldn't used + # directly. It evaluates and returns `val', but if an evaluation + # error occurs, the text in `msg' is added to the error context + # (stack trace) printed by Nix. + addErrorContext = + if builtins ? addErrorContext + then builtins.addErrorContext + else msg: val: val; + + + +} \ No newline at end of file diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 349d38f90550..ee3b1ad085d9 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -1,873 +1,17 @@ -# Utility functions. +let -let - - inherit (builtins) - head tail isList stringLength substring lessThan sub - listToAttrs attrNames hasAttr; + trivial = import ./trivial.nix; + lists = import ./lists.nix; + strings = import ./strings.nix; + attrsets = import ./attrsets.nix; + sources = import ./sources.nix; + options = import ./options.nix; + debug = import ./attrsets.nix; + misc = import ./misc.nix; in - -rec { - listOfListsToAttrs = ll : builtins.listToAttrs (map (l : { name = (head l); value = (head (tail l)); }) ll); - - - # Identity function. - id = x: x; - - - # accumulates / merges all attr sets until null is fed. - # example: sumArgs id { a = 'a'; x = 'x'; } { y = 'y'; x = 'X'; } null - # result : { a = 'a'; x = 'X'; y = 'Y'; } - innerSumArgs = f : x : y : (if y == null then (f x) - else (innerSumArgs f (x // y))); - sumArgs = f : innerSumArgs f {}; - - # Advanced sumArgs version. Hm, twice as slow, I'm afraid. - # composedArgs id (x:x//{a="b";}) (x:x//{b=x.a + "c";}) null; - # {a="b" ; b="bc";}; - innerComposedArgs = f : x : y : (if y==null then (f x) - else (if (builtins.isAttrs y) then - (innerComposedArgs f (x//y)) - else (innerComposedArgs f (y x)))); - composedArgs = f: innerComposedArgs f {}; - - defaultMergeArg = x : y: if builtins.isAttrs y then - y - else - (y x); - defaultMerge = x: y: x // (defaultMergeArg x y); - sumTwoArgs = f: x: y: - f (defaultMerge x y); - foldArgs = merger: f: init: x: - let arg=(merger init (defaultMergeArg init x)); in - # now add the function with composed args already applied to the final attrs - setAttrMerge "passthru" {} (f arg) ( x : x // { function = foldArgs merger f arg; } ); - - # returns f x // { passthru.fun = y : f (merge x y); } while preserving other passthru names. - # example: let ex = applyAndFun (x : removeAttrs x ["fixed"]) (mergeOrApply mergeAttr) {name = 6;}; - # usage1 = ex.passthru.fun { name = 7; }; # result: { name = 7;} - # usage2 = ex.passthru.fun (a: a // {name = __add a.name 1; }); # result: { a = 7; } - # fix usage: - # usage3a = ex.passthru.fun (a: a // {name2 = a.fixed.toBePassed; }); # usage3a will fail because toBePassed is not yet given - # usage3b usage3a.passthru.fun { toBePassed = "foo";}; # result { name = 7; name2 = "foo"; toBePassed = "foo"; fixed = ; } - applyAndFun = f : merge : x : assert (__isAttrs x || __isFunction x); - let takeFix = if (__isFunction x) then x else (attr: merge attr x); in - setAttrMerge "passthru" {} (fix (fixed : f (takeFix {inherit fixed;}))) - ( y : y // - { - fun = z : applyAndFun f merge (fixed: merge (takeFix fixed) z); - funMerge = z : applyAndFun f merge (fixed: let e = takeFix fixed; in merge e (merge e z)); - } ); - mergeOrApply = merge : x : y : if (__isFunction y) then y x else merge x y; - - # rec { # an example of how composedArgsAndFun can be used - # a = composedArgsAndFun (x : x) { a = ["2"]; meta = { d = "bar";}; }; - # # meta.d will be lost ! It's your task to preserve it (eg using a merge function) - # b = a.passthru.function { a = [ "3" ]; meta = { d2 = "bar2";}; }; - # # instead of passing/ overriding values you can use a merge function: - # c = b.passthru.function ( x: { a = x.a ++ ["4"]; }); # consider using (maybeAttr "a" [] x) - # } - # result: - # { - # a = { a = ["2"]; meta = { d = "bar"; }; passthru = { function = .. }; }; - # b = { a = ["3"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; }; - # c = { a = ["3" "4"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; }; - # # c2 is equal to c - # } - composedArgsAndFun = f: foldArgs defaultMerge f {}; - - # example a = pairMap (x : y : x + y) ["a" "b" "c" "d"]; - # result: ["ab" "cd"] - innerPairMap = acc: f: l: - if l == [] then acc else - innerPairMap (acc ++ [(f (head l)(head (tail l)))]) - f (tail (tail l)); - pairMap = innerPairMap []; - - - - # "Fold" a binary function `op' between successive elements of - # `list' with `nul' as the starting value, i.e., `fold op nul [x_1 - # x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))'. (This is - # Haskell's foldr). - fold = op: nul: list: - if list == [] - then nul - else op (head list) (fold op nul (tail list)); - - # Haskell's fold - foldl = op: nul: list: - if list == [] - then nul - else fold op (op nul (head list)) (tail list); - - - # Concatenate a list of lists. - concatList = x : y : x ++ y; - concatLists = fold concatList []; - - - # Concatenate a list of strings. - concatStrings = - fold (x: y: x + y) ""; - - - # Map and concatenate the result. - concatMap = f: list: concatLists (map f list); - - concatMapStrings = f: list: concatStrings (map f list); - - - # Place an element between each element of a list, e.g., - # `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"]. - intersperse = separator: list: - if list == [] || tail list == [] - then list - else [(head list) separator] - ++ (intersperse separator (tail list)); - - toList = x : if (__isList x) then x else [x]; - - concatStringsSep = separator: list: - concatStrings (intersperse separator list); - - makeLibraryPath = paths: concatStringsSep ":" (map (path: path + "/lib") paths); - - - # Flatten the argument into a single list; that is, nested lists are - # spliced into the top-level lists. E.g., `flatten [1 [2 [3] 4] 5] - # == [1 2 3 4 5]' and `flatten 1 == [1]'. - flatten = x: - if isList x - then fold (x: y: (flatten x) ++ y) [] x - else [x]; - - - # Return an attribute from nested attribute sets. For instance ["x" - # "y"] applied to some set e returns e.x.y, if it exists. The - # default value is returned otherwise. - # comment: there is also builtins.getAttr ? (is there a better name for this function?) - getAttr = attrPath: default: e: - let attr = head attrPath; - in - if attrPath == [] then e - else if builtins ? hasAttr && builtins.hasAttr attr e - then getAttr (tail attrPath) default (builtins.getAttr attr e) - else default; - - # shortcut for getAttr ["name"] default attrs - maybeAttr = name: default: attrs: - if (__hasAttr name attrs) then (__getAttr name attrs) else default; - - - # Filter a list using a predicate; that is, return a list containing - # every element from `list' for which `pred' returns true. - filter = pred: list: - fold (x: y: if pred x then [x] ++ y else y) [] list; - - - # Return true if `list' has an element `x': - elem = x: list: fold (a: bs: x == a || bs) false list; - - - # Find the sole element in the list matching the specified - # predicate, returns `default' if no such element exists, or - # `multiple' if there are multiple matching elements. - findSingle = pred: default: multiple: list: - let found = filter pred list; - in if found == [] then default - else if tail found != [] then multiple - else head found; - - - # Return true iff function `pred' returns true for at least element - # of `list'. - any = pred: list: - if list == [] then false - else if pred (head list) then true - else any pred (tail list); - - - # Return true iff function `pred' returns true for all elements of - # `list'. - all = pred: list: - if list == [] then true - else if pred (head list) then all pred (tail list) - else false; - - # much shorter implementations using map and fold (are lazy as well) - # which ones are better? - # true if all/ at least one element(s) satisfy f - # all = f : l : fold logicalAND true (map f l); - # any = f : l : fold logicalOR false (map f l); - - - # Return true if each element of a list is equal, false otherwise. - eqLists = xs: ys: - if xs == [] && ys == [] then true - else if xs == [] || ys == [] then false - else head xs == head ys && eqLists (tail xs) (tail ys); - - - # Workaround, but works in stable Nix now. - eqStrings = a: b: (a+(substring 0 0 b)) == ((substring 0 0 a)+b); - - - # Determine whether a filename ends in the given suffix. - hasSuffix = ext: fileName: - let lenFileName = stringLength fileName; - lenExt = stringLength ext; - in !(lessThan lenFileName lenExt) && - substring (sub lenFileName lenExt) lenFileName fileName == ext; - - hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b); - - - # Bring in a path as a source, filtering out all Subversion and CVS - # directories, as well as backup files (*~). - cleanSource = - let filter = name: type: let baseName = baseNameOf (toString name); in ! ( - # Filter out Subversion and CVS directories. - (type == "directory" && (baseName == ".svn" || baseName == "CVS")) || - # Filter out backup files. - (hasSuffix "~" baseName) - ); - in src: builtins.filterSource filter src; - - - # Get all files ending with the specified suffices from the given - # directory. E.g. `sourceFilesBySuffices ./dir [".xml" ".c"]'. - sourceFilesBySuffices = path: exts: - let filter = name: type: - let base = baseNameOf (toString name); - in type != "directory" && any (ext: hasSuffix ext base) exts; - in builtins.filterSource filter path; - - - # Return a singleton list or an empty list, depending on a boolean - # value. Useful when building lists with optional elements - # (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 []; - - optionalString = cond: string: if cond then string else ""; - - - # Return the second argument if the first one is true or the empty version - # of the second argument. - ifEnable = cond: val: - if cond then val - else if builtins.isList val then [] - else if builtins.isAttrs val then {} - # else if builtins.isString val then "" - else if (val == true || val == false) then false - else null; - - - # Return a list of integers from `first' up to and including `last'. - range = first: last: - if builtins.lessThan last first - then [] - else [first] ++ range (builtins.add first 1) last; - - - # Return true only if there is an attribute and it is true. - checkFlag = attrSet: name: - if (name == "true") then true else - if (name == "false") then false else - if (isInList (getAttr ["flags"] [] attrSet) name) then true else - getAttr [name] false attrSet ; - - - logicalOR = x: y: x || y; - logicalAND = x: y: x && y; - - - # Input : attrSet, [ [name default] ... ], name - # Output : its value or default. - getValue = attrSet: argList: name: - ( getAttr [name] (if checkFlag attrSet name then true else - if argList == [] then null else - let x = builtins.head argList; in - if (head x) == name then - (head (tail x)) - else (getValue attrSet - (tail argList) name)) attrSet ); - - - # Input : attrSet, [[name default] ...], [ [flagname reqs..] ... ] - # Output : are reqs satisfied? It's asserted. - checkReqs = attrSet : argList : condList : - ( - fold logicalAND true - (map (x: let name = (head x) ; in - - ((checkFlag attrSet name) -> - (fold logicalAND true - (map (y: let val=(getValue attrSet argList y); in - (val!=null) && (val!=false)) - (tail x))))) condList)) ; - - - isInList = list: x: - if (list == []) then false else - if (x == (head list)) then true else - isInList (tail list) x; - - - uniqList = {inputList, outputList ? []}: - if (inputList == []) then outputList else - let x=head inputList; - newOutputList = outputList ++ - (if (isInList outputList x) then [] else [x]); - in uniqList {outputList=newOutputList; - inputList = (tail inputList);}; - - uniqListExt = {inputList, outputList ? [], - getter ? (x : x), compare ? (x: y: x==y)}: - if (inputList == []) then outputList else - let x=head inputList; - isX = y: (compare (getter y) (getter x)); - newOutputList = outputList ++ - (if any isX outputList then [] else [x]); - in uniqListExt {outputList=newOutputList; - inputList = (tail inputList); - inherit getter compare; - }; - - - - condConcat = name: list: checker: - if list == [] then name else - if checker (head list) then - condConcat - (name + (head (tail list))) - (tail (tail list)) - checker - else condConcat - name (tail (tail list)) checker; - - # Merge sets of attributes and use the function f to merge - # attributes values. - zip = f: sets: - builtins.listToAttrs (map (name: { - inherit name; - value = - f name - (map (__getAttr name) - (filter (__hasAttr name) sets)); - }) (concatMap builtins.attrNames sets)); - - # divide a list in two depending on the evaluation of a predicate. - partition = pred: - fold (h: t: - if pred h - then { right = [h] ++ t.right; wrong = t.wrong; } - else { right = t.right; wrong = [h] ++ t.wrong; } - ) { right = []; wrong = []; }; - - # Take a function and evaluate it with its own returned value. - fix = f: - (rec { result = f result; }).result; - - # flatten a list of elements by following the properties of the elements. - # next : return the list of following elements. - # seen : lists of elements already visited. - # default: result if 'x' is empty. - # x : list of values that have to be processed. - uniqFlatten = next: seen: default: x: - if x == [] - then default - else - let h = head x; t = tail x; n = next h; in - if elem h seen - then uniqFlatten next seen default t - else uniqFlatten next (seen ++ [h]) (default ++ [h]) (n ++ t) - ; - - /* If. ThenElse. Always. */ - - # create "if" statement that can be dealyed on sets until a "then-else" or - # "always" set is reached. When an always set is reached the condition - # is ignore. - - isIf = attrs: (typeOf attrs) == "if"; - mkIf = condition: thenelse: - if isIf thenelse then - mkIf (condition && thenelse.condition) thenelse.thenelse - else { - _type = "if"; - inherit condition thenelse; - }; - - - isNotdef = attrs: (typeOf attrs) == "notdef"; - mkNotdef = {_type = "notdef";}; - - - isThenElse = attrs: (typeOf attrs) == "then-else"; - mkThenElse = attrs: - assert attrs ? thenPart && attrs ? elsePart; - attrs // { _type = "then-else"; }; - - - isAlways = attrs: (typeOf attrs) == "always"; - mkAlways = value: { inherit value; _type = "always"; }; - - pushIf = f: attrs: - if isIf attrs then pushIf f ( - let val = attrs.thenelse; in - # evaluate the condition. - if isThenElse val then - if attrs.condition then - val.thenPart - else - val.elsePart - # ignore the condition. - else if isAlways val then - val.value - # otherwise - else - f attrs.condition val) - else - attrs; - - # take care otherwise you will have to handle this by hand. - rmIf = pushIf (condition: val: val); - - evalIf = pushIf (condition: val: - if condition then val else mkNotdef - ); - - delayIf = pushIf (condition: val: - # rewrite the condition on sub-attributes. - mapAttrs (name: mkIf condition) val - ); - - /* Options. */ - - mkOption = attrs: attrs // {_type = "option";}; - - typeOf = x: if (__isAttrs x && x ? _type) then x._type else ""; - - isOption = attrs: (typeOf attrs) == "option"; - - addDefaultOptionValues = defs: opts: opts // - builtins.listToAttrs (map (defName: - { name = defName; - value = - let - defValue = builtins.getAttr defName defs; - optValue = builtins.getAttr defName opts; - in - if typeOf defValue == "option" - then - # `defValue' is an option. - if builtins.hasAttr defName opts - then builtins.getAttr defName opts - else defValue.default - else - # `defValue' is an attribute set containing options. - # So recurse. - if builtins.hasAttr defName opts && builtins.isAttrs optValue - then addDefaultOptionValues defValue optValue - else addDefaultOptionValues defValue {}; - } - ) (builtins.attrNames defs)); - - mergeDefaultOption = list: - if list != [] && tail list == [] then head list - else if all __isFunction list then x: mergeDefaultOption (map (f: f x) list) - else if all __isList list then concatLists list - else if all __isAttrs list then mergeAttrs list - else if all (x: true == x || false == x) list then fold logicalOR false list - else if all (x: x == toString x) list then concatStrings list - else throw "Cannot merge values."; - - mergeTypedOption = typeName: predicate: merge: list: - if all predicate list then merge list - else throw "Expect a ${typeName}."; - - mergeEnableOption = mergeTypedOption "boolean" - (x: true == x || false == x) (fold logicalOR false); - - mergeListOption = mergeTypedOption "list" - __isList concatLists; - - mergeStringOption = mergeTypedOption "string" - (x: if builtins ? isString then builtins.isString x else x + "") - concatStrings; - - mergeOneOption = list: - if list == [] then abort "This case should never happens." - else if tail list != [] then throw "Multiple definitions. Only one is allowed for this option." - else head list; - - - # Handle the traversal of option sets. All sets inside 'opts' are zipped - # and options declaration and definition are separated. If no option are - # declared at a specific depth, then the function recurse into the values. - # Other cases are handled by the optionHandler which contains two - # functions that are used to defined your goal. - # - export is a function which takes two arguments which are the option - # and the list of values. - # - notHandle is a function which takes the list of values are not handle - # by this function. - handleOptionSets = optionHandler@{export, notHandle, ...}: path: opts: - if all __isAttrs opts then - zip (attr: opts: - let - # Compute the path to reach the attribute. - name = if path == "" then attr else path + "." + attr; - - # Divide the definitions of the attribute "attr" between - # declaration (isOption) and definitions (!isOption). - test = partition isOption opts; - decls = test.right; defs = test.wrong; - - # Return the option declaration and add missing default - # attributes. - opt = { - inherit name; - merge = mergeDefaultOption; - apply = id; - } // (head decls); - - # Return the list of option sets. - optAttrs = map delayIf defs; - - # return the list of option values. - # Remove undefined values that are coming from evalIf. - optValues = filter (x: !isNotdef x) (map evalIf defs); - in - if decls == [] then handleOptionSets optionHandler name optAttrs - else addErrorContext "while evaluating the option ${name}:" ( - if tail decls != [] then throw "Multiple options." - else export opt optValues - ) - ) opts - else addErrorContext "while evaluating ${path}:" (notHandle opts); - - # Merge option sets and produce a set of values which is the merging of - # all options declare and defined. If no values are defined for an - # option, then the default value is used otherwise it use the merge - # function of each option to get the result. - mergeOptionSets = noOption: newMergeOptionSets; # ignore argument - newMergeOptionSets = - handleOptionSets { - export = opt: values: - opt.apply ( - if values == [] then - if opt ? default then opt.default - else throw "Not defined." - else opt.merge values - ); - notHandle = opts: throw "Used without option declaration."; - }; - - # Keep all option declarations. - filterOptionSets = - handleOptionSets { - export = opt: values: opt; - notHandle = opts: {}; - }; - - # Evaluate a list of option sets that would be merged with the - # function "merge" which expects two arguments. The attribute named - # "require" is used to imports option declarations and bindings. - # - # * cfg[0-9]: configuration - # * cfgSet[0-9]: configuration set - # - # merge: the function used to merge options sets. - # pkgs: is the set of packages available. (nixpkgs) - # opts: list of option sets or option set functions. - # config: result of this evaluation. - fixOptionSetsFun = merge: pkgs: opts: config: - let - # remove possible mkIf to access the require attribute. - noImportConditions = cfgSet0: - let cfgSet1 = delayIf cfgSet0; in - if cfgSet1 ? require then - cfgSet1 // { require = rmIf cfgSet1.require; } - else - cfgSet1; - - # call configuration "files" with one of the existing convention. - argumentHandler = cfg: - let - # {..} - cfg0 = cfg; - # {pkgs, config, ...}: {..} - cfg1 = cfg { inherit pkgs config merge; }; - # pkgs: config: {..} - cfg2 = cfg {} {}; - in - if __isFunction cfg0 then - if builtins.isAttrs cfg1 then cfg1 - else builtins.trace "Use '{pkgs, config, ...}:'." cfg2 - else cfg0; - - preprocess = cfg0: - let cfg1 = argumentHandler cfg0; - cfg2 = noImportConditions cfg1; - in cfg2; - - getRequire = x: toList (getAttr ["require"] [] (preprocess x)); - rmRequire = x: removeAttrs (preprocess x) ["require"]; - in - merge "" ( - map rmRequire ( - uniqFlatten getRequire [] [] (toList opts) - ) - ); - - fixOptionSets = merge: pkgs: opts: - fix (fixOptionSetsFun merge pkgs opts); - - optionAttrSetToDocList = (l: attrs: - (if (getAttr ["_type"] "" attrs) == "option" then - [({ - #inherit (attrs) description; - description = if attrs ? description then attrs.description else - throw ("No description ${toString l} : ${whatis attrs}"); - } - //(if attrs ? example then {inherit(attrs) example;} else {} ) - //(if attrs ? default then {inherit(attrs) default;} else {} ) - //{name = l;} - )] - else (concatLists (map (s: (optionAttrSetToDocList - (l + (if l=="" then "" else ".") + s) (builtins.getAttr s attrs))) - (builtins.attrNames attrs))))); - - innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else - innerModifySumArgs f x (a // b); - modifySumArgs = f: x: innerModifySumArgs f x {}; - - # Wrapper aroung addErrorContext. The builtin should not be used - # directly. - addErrorContext = - if builtins ? addErrorContext - then builtins.addErrorContext - else msg: val: val; - - debugVal = if builtins ? trace then x: (builtins.trace x x) else x: x; - debugXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x; - - # this can help debug your code as well - designed to not produce thousands of lines - traceWhatis = x : __trace (whatis x) x; - traceMarked = str: x: __trace (str + (whatis x)) x; - attrNamesToStr = a : concatStringsSep "; " (map (x : "${x}=") (__attrNames a)); - whatis = x : - if (__isAttrs x) then - if (x ? outPath) then "x is a derivation, name ${if x ? name then x.name else ""}, { ${attrNamesToStr x} }" - else "x is attr set { ${attrNamesToStr x} }" - else if (__isFunction x) then "x is a function" - else if (x == []) then "x is an empty list" - else if (__isList x) then "x is a list, first item is : ${whatis (__head x)}" - else if (x == true) then "x is boolean true" - else if (x == false) then "x is boolean false" - else if (x == null) then "x is null" - else "x is probably a string starting, starting characters: ${__substring 0 50 x}.."; - # trace the arguments passed to function and its result - traceCall = n : f : a : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); - traceCall2 = n : f : a : b : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); - traceCall3 = n : f : a : b : c : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); - - - - innerClosePropagation = ready: list: if list == [] then ready else - if (head list) ? propagatedBuildInputs then - innerClosePropagation (ready ++ [(head list)]) - ((head list).propagatedBuildInputs ++ (tail list)) else - innerClosePropagation (ready ++ [(head list)]) (tail list); - - closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);}); - - stringToCharacters = s : let l = __stringLength s; in - if (__lessThan l 1) then [""] else [(__substring 0 1 s)] ++ stringToCharacters (__substring 1 (__sub l 1) s); - - # should this be implemented as primop ? Yes it should.. - escapeShellArg = s : - let escapeChar = x : if ( x == "'" ) then "'\"'\"'" else x; - in "'" + concatStrings (map escapeChar (stringToCharacters s) ) +"'"; - - defineShList = name : list : "\n${name}=(${concatStringsSep " " (map escapeShellArg list)})\n"; - - # this as well :-) arg: http://foo/bar/bz.ext returns bz.ext - dropPath = s : - if s == "" then "" else - let takeTillSlash = left : c : s : - if left == 0 then s - else if (__substring left 1 s == "/") then - (__substring (__add left 1) (__sub c 1) s) - else takeTillSlash (__sub left 1) (__add c 1) s; in - takeTillSlash (__sub (__stringLength s) 1) 1 s; - - # calls a function (f attr value ) for each record item. returns a list - # should be renamed to mapAttrsFlatten - mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r); - - # maps a function on each attr value - # f = attr : value : .. - mapAttrs = f : r : listToAttrs ( mapRecordFlatten (a : v : nv a ( f a v ) ) r); - - # to be used with listToAttrs (_a_ttribute _v_alue) - nv = name : value : { inherit name value; }; - # attribute set containing one attribute - nvs = name : value : listToAttrs [ (nv name value) ]; - # adds / replaces an attribute of an attribute set - setAttr = set : name : v : set // (nvs name v); - - # setAttrMerge (similar to mergeAttrsWithFunc but only merges the values of a particular name) - # setAttrMerge "a" [] { a = [2];} (x : x ++ [3]) -> { a = [2 3]; } - # setAttrMerge "a" [] { } (x : x ++ [3]) -> { a = [ 3]; } - setAttrMerge = name : default : attrs : f : - setAttr attrs name (f (maybeAttr name default attrs)); - - # iterates over a list of attributes collecting the attribute attr if it exists - catAttrs = attr : l : fold ( s : l : if (hasAttr attr s) then [(builtins.getAttr attr s)] ++ l else l) [] l; - - mergeAttr = x : y : x // y; - mergeAttrs = fold mergeAttr {}; - - attrVals = nameList : attrSet : - map (x: builtins.getAttr x attrSet) nameList; - - # Using f = a : b = b the result is similar to // - # merge attributes with custom function handling the case that the attribute - # exists in both sets - mergeAttrsWithFunc = f : set1 : set2 : - fold (n: set : if (__hasAttr n set) - then setAttr set n (f (__getAttr n set) (__getAttr n set2)) - else set ) - set1 (__attrNames set2); - - # merging two attribute set concatenating the values of same attribute names - # eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; } - mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a : b : (toList a) ++ (toList b) ); - - # merges attributes using //, if a name exisits in both attributes - # an error will be triggered unless its listed in mergeLists - # so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get - # { buildInputs = [a b]; } - # merging buildPhase does'nt really make sense. The cases will be rare where appending /prefixing will fit your needs? - # in these cases the first buildPhase will override the second one - # ! depreceated, use mergeAttrByFunc instead - mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"], - overrideSnd ? [ "buildPhase" ] - } : attrs1 : attrs2 : - fold (n: set : - setAttr set n ( if (__hasAttr n set) - then # merge - if elem n mergeLists # attribute contains list, merge them by concatenating - then (__getAttr n attrs2) ++ (__getAttr n attrs1) - else if elem n overrideSnd - then __getAttr n attrs1 - else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined" - else __getAttr n attrs2 # add attribute not existing in attr1 - )) attrs1 (__attrNames attrs2); - - - # example usage: - # mergeAttrByFunc { - # inherit mergeAttrBy; # defined below - # buildInputs = [ a b ]; - # } { - # buildInputs = [ c d ]; - # }; - # will result in - # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; } - # is used by prepareDerivationArgs and can be used when composing using - # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix - mergeAttrByFunc = x : y : - let - mergeAttrBy2 = { mergeAttrBy=mergeAttr; } - // (maybeAttr "mergeAttrBy" {} x) - // (maybeAttr "mergeAttrBy" {} y); in - mergeAttrs [ - x y - (mapAttrs ( a : v : # merge special names using given functions - if (__hasAttr a x) - then if (__hasAttr a y) - then v (__getAttr a x) (__getAttr a y) # both have attr, use merge func - else (__getAttr a x) # only x has attr - else (__getAttr a y) # only y has attr) - ) (removeAttrs mergeAttrBy2 - # don't merge attrs which are neither in x nor y - (filter (a : (! __hasAttr a x) && (! __hasAttr a y) ) - (__attrNames mergeAttrBy2)) - ) - ) - ]; - mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; }; - # sane defaults (same name as attr name so that inherit can be used) - mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; } - listToAttrs (map (n : nv n concatList) [ "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ]) - // listToAttrs (map (n : nv n mergeAttr) [ "passthru" "meta" "cfg" "flags" ]); - - # returns atribute values as a list - flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set); - mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) []; - - # pick attrs subset_attr_names and apply f - subsetmap = f : attrs : subset_attr_names : - listToAttrs (fold ( attr : r : if __hasAttr attr attrs - then r ++ [ ( nv attr ( f (__getAttr attr attrs) ) ) ] else r ) [] - subset_attr_names ); - - # prepareDerivationArgs tries to make writing configurable derivations easier - # example: - # prepareDerivationArgs { - # mergeAttrBy = { - # myScript = x : y : x ++ "\n" ++ y; - # }; - # cfg = { - # readlineSupport = true; - # }; - # flags = { - # readline = { - # set = { - # configureFlags = [ "--with-compiler=${compiler}" ]; - # buildInputs = [ compiler ]; - # pass = { inherit compiler; READLINE=1; }; - # assertion = compiler.dllSupport; - # myScript = "foo"; - # }; - # unset = { configureFlags = ["--without-compiler"]; }; - # }; - # }; - # src = ... - # buildPhase = '' ... ''; - # name = ... - # myScript = "bar"; - # }; - # if you don't have need for unset you can omit the surrounding set = { .. } attr - # all attrs except flags cfg and mergeAttrBy will be merged with the - # additional data from flags depending on config settings - # It's used in composableDerivation in all-packages.nix. It's also used - # heavily in the new python and libs implementation - # - # should we check for misspelled cfg options? - prepareDerivationArgs = args: - let args2 = { cfg = {}; flags = {}; } // args; - flagName = name : "${name}Support"; - cfgWithDefaults = (listToAttrs (map (n : nv (flagName n) false) (attrNames args2.flags))) - // args2.cfg; - opts = flattenAttrs (mapAttrs (a : v : - let v2 = if (v ? set || v ? unset) then v else { set = v; }; - n = if (__getAttr (flagName a) cfgWithDefaults) then "set" else "unset"; - attr = maybeAttr n {} v2; in - if (maybeAttr "assertion" true attr) - then attr - else throw "assertion of flag ${a} of derivation ${args.name} failed" - ) args2.flags ); - in removeAttrs - (mergeAttrsByFuncDefaults ([args] ++ opts ++ [{ passthru = cfgWithDefaults; }])) - ["flags" "cfg" "mergeAttrBy" "fixed" ]; # fixed may be passed as fix argument or such - -} + { inherit trivial lists strings attrsets sources options debug; } + # !!! don't include everything at top-level; perhaps only the most + # commonly used functions. + // trivial // lists // strings // attrsets // sources // options + // debug // misc diff --git a/pkgs/lib/lists.nix b/pkgs/lib/lists.nix new file mode 100644 index 000000000000..b186e97a55b3 --- /dev/null +++ b/pkgs/lib/lists.nix @@ -0,0 +1,118 @@ +# General list operations. + +rec { + inherit (builtins) head tail isList; + + + # "Fold" a binary function `op' between successive elements of + # `list' with `nul' as the starting value, i.e., `fold op nul [x_1 + # x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))'. (This is + # Haskell's foldr). + fold = op: nul: list: + if list == [] + then nul + else op (head list) (fold op nul (tail list)); + + + # Left fold: `fold op nul [x_1 x_2 ... x_n] == op (... (op (op nul + # x_1) x_2) ... x_n)'. + foldl = op: nul: list: + if list == [] + then nul + else foldl op (op nul (head list)) (tail list); + + + # Concatenate a list of lists. + concatLists = fold (x: y: x ++ y) []; + + + # Map and concatenate the result. + concatMap = f: list: concatLists (map f list); + + + # Flatten the argument into a single list; that is, nested lists are + # spliced into the top-level lists. E.g., `flatten [1 [2 [3] 4] 5] + # == [1 2 3 4 5]' and `flatten 1 == [1]'. + flatten = x: + if isList x + then fold (x: y: (flatten x) ++ y) [] x + else [x]; + + + # Filter a list using a predicate; that is, return a list containing + # every element from `list' for which `pred' returns true. + filter = pred: list: + fold (x: y: if pred x then [x] ++ y else y) [] list; + + + # Return true if `list' has an element `x': + elem = x: list: fold (a: bs: x == a || bs) false list; + + + # Find the sole element in the list matching the specified + # predicate, returns `default' if no such element exists, or + # `multiple' if there are multiple matching elements. + findSingle = pred: default: multiple: list: + let found = filter pred list; + in if found == [] then default + else if tail found != [] then multiple + else head found; + + + # Return true iff function `pred' returns true for at least element + # of `list'. + any = pred: list: + if list == [] then false + else if pred (head list) then true + else any pred (tail list); + + + # Return true iff function `pred' returns true for all elements of + # `list'. + all = pred: list: + if list == [] then true + else if pred (head list) then all pred (tail list) + else false; + + + # Return true if each element of a list is equal, false otherwise. + eqLists = xs: ys: + if xs == [] && ys == [] then true + else if xs == [] || ys == [] then false + else head xs == head ys && eqLists (tail xs) (tail ys); + + + # Return a singleton list or an empty list, depending on a boolean + # value. Useful when building lists with optional elements + # (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 []; + + + # If argument is a list, return it; else, wrap it in a singleton + # list. If you're using this, you should almost certainly + # reconsider if there isn't a more "well-typed" approach. + toList = x: if builtins.isList x then x else [x]; + + + # Return a list of integers from `first' up to and including `last'. + range = first: last: + if builtins.lessThan last first + then [] + else [first] ++ range (builtins.add first 1) last; + + + # Partition the elements of a list in two lists, `right' and + # `wrong', depending on the evaluation of a predicate. + partition = pred: + fold (h: t: + if pred h + then { right = [h] ++ t.right; wrong = t.wrong; } + else { right = t.right; wrong = [h] ++ t.wrong; } + ) { right = []; wrong = []; }; + + +} diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix new file mode 100644 index 000000000000..548b8d22edf1 --- /dev/null +++ b/pkgs/lib/misc.nix @@ -0,0 +1,385 @@ +let lib = import ./default.nix; in + +with import ./lists.nix; +with import ./attrsets.nix; +with import ./strings.nix; + +rec { + + + # accumulates / merges all attr sets until null is fed. + # example: sumArgs id { a = 'a'; x = 'x'; } { y = 'y'; x = 'X'; } null + # result : { a = 'a'; x = 'X'; y = 'Y'; } + innerSumArgs = f : x : y : (if y == null then (f x) + else (innerSumArgs f (x // y))); + sumArgs = f : innerSumArgs f {}; + + # Advanced sumArgs version. Hm, twice as slow, I'm afraid. + # composedArgs id (x:x//{a="b";}) (x:x//{b=x.a + "c";}) null; + # {a="b" ; b="bc";}; + innerComposedArgs = f : x : y : (if y==null then (f x) + else (if (builtins.isAttrs y) then + (innerComposedArgs f (x//y)) + else (innerComposedArgs f (y x)))); + composedArgs = f: innerComposedArgs f {}; + + defaultMergeArg = x : y: if builtins.isAttrs y then + y + else + (y x); + defaultMerge = x: y: x // (defaultMergeArg x y); + sumTwoArgs = f: x: y: + f (defaultMerge x y); + foldArgs = merger: f: init: x: + let arg=(merger init (defaultMergeArg init x)); in + # now add the function with composed args already applied to the final attrs + setAttrMerge "passthru" {} (f arg) ( x : x // { function = foldArgs merger f arg; } ); + + # returns f x // { passthru.fun = y : f (merge x y); } while preserving other passthru names. + # example: let ex = applyAndFun (x : removeAttrs x ["fixed"]) (mergeOrApply mergeAttr) {name = 6;}; + # usage1 = ex.passthru.fun { name = 7; }; # result: { name = 7;} + # usage2 = ex.passthru.fun (a: a // {name = __add a.name 1; }); # result: { a = 7; } + # fix usage: + # usage3a = ex.passthru.fun (a: a // {name2 = a.fixed.toBePassed; }); # usage3a will fail because toBePassed is not yet given + # usage3b usage3a.passthru.fun { toBePassed = "foo";}; # result { name = 7; name2 = "foo"; toBePassed = "foo"; fixed = ; } + applyAndFun = f : merge : x : assert (__isAttrs x || __isFunction x); + let takeFix = if (__isFunction x) then x else (attr: merge attr x); in + setAttrMerge "passthru" {} (lib.fix (fixed : f (takeFix {inherit fixed;}))) + ( y : y // + { + fun = z : applyAndFun f merge (fixed: merge (takeFix fixed) z); + funMerge = z : applyAndFun f merge (fixed: let e = takeFix fixed; in merge e (merge e z)); + } ); + mergeOrApply = merge : x : y : if (__isFunction y) then y x else merge x y; + + # rec { # an example of how composedArgsAndFun can be used + # a = composedArgsAndFun (x : x) { a = ["2"]; meta = { d = "bar";}; }; + # # meta.d will be lost ! It's your task to preserve it (eg using a merge function) + # b = a.passthru.function { a = [ "3" ]; meta = { d2 = "bar2";}; }; + # # instead of passing/ overriding values you can use a merge function: + # c = b.passthru.function ( x: { a = x.a ++ ["4"]; }); # consider using (maybeAttr "a" [] x) + # } + # result: + # { + # a = { a = ["2"]; meta = { d = "bar"; }; passthru = { function = .. }; }; + # b = { a = ["3"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; }; + # c = { a = ["3" "4"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; }; + # # c2 is equal to c + # } + composedArgsAndFun = f: foldArgs defaultMerge f {}; + + # example a = pairMap (x : y : x + y) ["a" "b" "c" "d"]; + # result: ["ab" "cd"] + innerPairMap = acc: f: l: + if l == [] then acc else + innerPairMap (acc ++ [(f (head l)(head (tail l)))]) + f (tail (tail l)); + pairMap = innerPairMap []; + + + # shortcut for getAttr ["name"] default attrs + maybeAttr = name: default: attrs: + if (__hasAttr name attrs) then (__getAttr name attrs) else default; + + + # Return the second argument if the first one is true or the empty version + # of the second argument. + ifEnable = cond: val: + if cond then val + else if builtins.isList val then [] + else if builtins.isAttrs val then {} + # else if builtins.isString val then "" + else if (val == true || val == false) then false + else null; + + + # Return true only if there is an attribute and it is true. + checkFlag = attrSet: name: + if (name == "true") then true else + if (name == "false") then false else + if (elem name (getAttr ["flags"] [] attrSet)) then true else + getAttr [name] false attrSet ; + + + # Input : attrSet, [ [name default] ... ], name + # Output : its value or default. + getValue = attrSet: argList: name: + ( getAttr [name] (if checkFlag attrSet name then true else + if argList == [] then null else + let x = builtins.head argList; in + if (head x) == name then + (head (tail x)) + else (getValue attrSet + (tail argList) name)) attrSet ); + + + # Input : attrSet, [[name default] ...], [ [flagname reqs..] ... ] + # Output : are reqs satisfied? It's asserted. + checkReqs = attrSet : argList : condList : + ( + fold lib.and true + (map (x: let name = (head x) ; in + + ((checkFlag attrSet name) -> + (fold lib.and true + (map (y: let val=(getValue attrSet argList y); in + (val!=null) && (val!=false)) + (tail x))))) condList)) ; + + + uniqList = {inputList, outputList ? []}: + if (inputList == []) then outputList else + let x=head inputList; + newOutputList = outputList ++ + (if elem x outputList then [] else [x]); + in uniqList {outputList=newOutputList; + inputList = (tail inputList);}; + + uniqListExt = {inputList, outputList ? [], + getter ? (x : x), compare ? (x: y: x==y)}: + if (inputList == []) then outputList else + let x=head inputList; + isX = y: (compare (getter y) (getter x)); + newOutputList = outputList ++ + (if any isX outputList then [] else [x]); + in uniqListExt {outputList=newOutputList; + inputList = (tail inputList); + inherit getter compare; + }; + + + + condConcat = name: list: checker: + if list == [] then name else + if checker (head list) then + condConcat + (name + (head (tail list))) + (tail (tail list)) + checker + else condConcat + name (tail (tail list)) checker; + + # Merge sets of attributes and use the function f to merge + # attributes values. + zip = f: sets: + builtins.listToAttrs (map (name: { + inherit name; + value = + f name + (map (__getAttr name) + (filter (__hasAttr name) sets)); + }) (concatMap builtins.attrNames sets)); + + # flatten a list of elements by following the properties of the elements. + # next : return the list of following elements. + # seen : lists of elements already visited. + # default: result if 'x' is empty. + # x : list of values that have to be processed. + uniqFlatten = next: seen: default: x: + if x == [] + then default + else + let h = head x; t = tail x; n = next h; in + if elem h seen + then uniqFlatten next seen default t + else uniqFlatten next (seen ++ [h]) (default ++ [h]) (n ++ t) + ; + + innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else + innerModifySumArgs f x (a // b); + modifySumArgs = f: x: innerModifySumArgs f x {}; + + debugVal = if builtins ? trace then x: (builtins.trace x x) else x: x; + debugXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x; + + # this can help debug your code as well - designed to not produce thousands of lines + traceWhatis = x : __trace (whatis x) x; + traceMarked = str: x: __trace (str + (whatis x)) x; + attrNamesToStr = a : concatStringsSep "; " (map (x : "${x}=") (__attrNames a)); + whatis = x : + if (__isAttrs x) then + if (x ? outPath) then "x is a derivation, name ${if x ? name then x.name else ""}, { ${attrNamesToStr x} }" + else "x is attr set { ${attrNamesToStr x} }" + else if (__isFunction x) then "x is a function" + else if (x == []) then "x is an empty list" + else if (__isList x) then "x is a list, first item is : ${whatis (__head x)}" + else if (x == true) then "x is boolean true" + else if (x == false) then "x is boolean false" + else if (x == null) then "x is null" + else "x is probably a string starting, starting characters: ${__substring 0 50 x}.."; + # trace the arguments passed to function and its result + traceCall = n : f : a : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); + traceCall2 = n : f : a : b : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); + traceCall3 = n : f : a : b : c : let t = n2 : x : traceMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); + + + + innerClosePropagation = ready: list: if list == [] then ready else + if (head list) ? propagatedBuildInputs then + innerClosePropagation (ready ++ [(head list)]) + ((head list).propagatedBuildInputs ++ (tail list)) else + innerClosePropagation (ready ++ [(head list)]) (tail list); + + closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);}); + + # calls a function (f attr value ) for each record item. returns a list + # should be renamed to mapAttrsFlatten + mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r); + + # maps a function on each attr value + # f = attr : value : .. + mapAttrs = f : r : listToAttrs ( mapRecordFlatten (a : v : nv a ( f a v ) ) r); + + # to be used with listToAttrs (_a_ttribute _v_alue) + nv = name : value : { inherit name value; }; + # attribute set containing one attribute + nvs = name : value : listToAttrs [ (nv name value) ]; + # adds / replaces an attribute of an attribute set + setAttr = set : name : v : set // (nvs name v); + + # setAttrMerge (similar to mergeAttrsWithFunc but only merges the values of a particular name) + # setAttrMerge "a" [] { a = [2];} (x : x ++ [3]) -> { a = [2 3]; } + # setAttrMerge "a" [] { } (x : x ++ [3]) -> { a = [ 3]; } + setAttrMerge = name : default : attrs : f : + setAttr attrs name (f (maybeAttr name default attrs)); + + # iterates over a list of attributes collecting the attribute attr if it exists + catAttrs = attr : l : fold ( s : l : if (hasAttr attr s) then [(builtins.getAttr attr s)] ++ l else l) [] l; + + attrVals = nameList : attrSet : + map (x: builtins.getAttr x attrSet) nameList; + + # Using f = a : b = b the result is similar to // + # merge attributes with custom function handling the case that the attribute + # exists in both sets + mergeAttrsWithFunc = f : set1 : set2 : + fold (n: set : if (__hasAttr n set) + then setAttr set n (f (__getAttr n set) (__getAttr n set2)) + else set ) + set1 (__attrNames set2); + + # merging two attribute set concatenating the values of same attribute names + # eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; } + mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a : b : (toList a) ++ (toList b) ); + + # merges attributes using //, if a name exisits in both attributes + # an error will be triggered unless its listed in mergeLists + # so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get + # { buildInputs = [a b]; } + # merging buildPhase does'nt really make sense. The cases will be rare where appending /prefixing will fit your needs? + # in these cases the first buildPhase will override the second one + # ! depreceated, use mergeAttrByFunc instead + mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"], + overrideSnd ? [ "buildPhase" ] + } : attrs1 : attrs2 : + fold (n: set : + setAttr set n ( if (__hasAttr n set) + then # merge + if elem n mergeLists # attribute contains list, merge them by concatenating + then (__getAttr n attrs2) ++ (__getAttr n attrs1) + else if elem n overrideSnd + then __getAttr n attrs1 + else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined" + else __getAttr n attrs2 # add attribute not existing in attr1 + )) attrs1 (__attrNames attrs2); + + + # example usage: + # mergeAttrByFunc { + # inherit mergeAttrBy; # defined below + # buildInputs = [ a b ]; + # } { + # buildInputs = [ c d ]; + # }; + # will result in + # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; } + # is used by prepareDerivationArgs and can be used when composing using + # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix + mergeAttrByFunc = x : y : + let + mergeAttrBy2 = { mergeAttrBy=lib.mergeAttrs; } + // (maybeAttr "mergeAttrBy" {} x) + // (maybeAttr "mergeAttrBy" {} y); in + fold lib.mergeAttrs {} [ + x y + (mapAttrs ( a : v : # merge special names using given functions + if (__hasAttr a x) + then if (__hasAttr a y) + then v (__getAttr a x) (__getAttr a y) # both have attr, use merge func + else (__getAttr a x) # only x has attr + else (__getAttr a y) # only y has attr) + ) (removeAttrs mergeAttrBy2 + # don't merge attrs which are neither in x nor y + (filter (a : (! __hasAttr a x) && (! __hasAttr a y) ) + (__attrNames mergeAttrBy2)) + ) + ) + ]; + mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; }; + # sane defaults (same name as attr name so that inherit can be used) + mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; } + listToAttrs (map (n : nv n lib.concat) [ "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ]) + // listToAttrs (map (n : nv n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ]); + + # returns atribute values as a list + flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set); + mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) []; + + # pick attrs subset_attr_names and apply f + subsetmap = f : attrs : subset_attr_names : + listToAttrs (fold ( attr : r : if __hasAttr attr attrs + then r ++ [ ( nv attr ( f (__getAttr attr attrs) ) ) ] else r ) [] + subset_attr_names ); + + # prepareDerivationArgs tries to make writing configurable derivations easier + # example: + # prepareDerivationArgs { + # mergeAttrBy = { + # myScript = x : y : x ++ "\n" ++ y; + # }; + # cfg = { + # readlineSupport = true; + # }; + # flags = { + # readline = { + # set = { + # configureFlags = [ "--with-compiler=${compiler}" ]; + # buildInputs = [ compiler ]; + # pass = { inherit compiler; READLINE=1; }; + # assertion = compiler.dllSupport; + # myScript = "foo"; + # }; + # unset = { configureFlags = ["--without-compiler"]; }; + # }; + # }; + # src = ... + # buildPhase = '' ... ''; + # name = ... + # myScript = "bar"; + # }; + # if you don't have need for unset you can omit the surrounding set = { .. } attr + # all attrs except flags cfg and mergeAttrBy will be merged with the + # additional data from flags depending on config settings + # It's used in composableDerivation in all-packages.nix. It's also used + # heavily in the new python and libs implementation + # + # should we check for misspelled cfg options? + prepareDerivationArgs = args: + let args2 = { cfg = {}; flags = {}; } // args; + flagName = name : "${name}Support"; + cfgWithDefaults = (listToAttrs (map (n : nv (flagName n) false) (attrNames args2.flags))) + // args2.cfg; + opts = flattenAttrs (mapAttrs (a : v : + let v2 = if (v ? set || v ? unset) then v else { set = v; }; + n = if (__getAttr (flagName a) cfgWithDefaults) then "set" else "unset"; + attr = maybeAttr n {} v2; in + if (maybeAttr "assertion" true attr) + then attr + else throw "assertion of flag ${a} of derivation ${args.name} failed" + ) args2.flags ); + in removeAttrs + (mergeAttrsByFuncDefaults ([args] ++ opts ++ [{ passthru = cfgWithDefaults; }])) + ["flags" "cfg" "mergeAttrBy" "fixed" ]; # fixed may be passed as fix argument or such + + +} \ No newline at end of file diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix new file mode 100644 index 000000000000..6d8bf4633de4 --- /dev/null +++ b/pkgs/lib/options.nix @@ -0,0 +1,267 @@ +# Nixpkgs/NixOS option handling. + +let lib = import ./default.nix; in + +with { inherit (builtins) head tail; }; +with import ./lists.nix; +with import ./attrsets.nix; + +rec { + + + mkOption = attrs: attrs // {_type = "option";}; + + typeOf = x: if (__isAttrs x && x ? _type) then x._type else ""; + + isOption = attrs: (typeOf attrs) == "option"; + + addDefaultOptionValues = defs: opts: opts // + builtins.listToAttrs (map (defName: + { name = defName; + value = + let + defValue = builtins.getAttr defName defs; + optValue = builtins.getAttr defName opts; + in + if typeOf defValue == "option" + then + # `defValue' is an option. + if builtins.hasAttr defName opts + then builtins.getAttr defName opts + else defValue.default + else + # `defValue' is an attribute set containing options. + # So recurse. + if builtins.hasAttr defName opts && builtins.isAttrs optValue + then addDefaultOptionValues defValue optValue + else addDefaultOptionValues defValue {}; + } + ) (builtins.attrNames defs)); + + mergeDefaultOption = list: + if list != [] && tail list == [] then head list + else if all __isFunction list then x: mergeDefaultOption (map (f: f x) list) + else if all __isList list then concatLists list + else if all __isAttrs list then fold lib.mergeAttrs {} list + else if all (x: true == x || false == x) list then fold lib.or false list + else if all (x: x == toString x) list then lib.concatStrings list + else throw "Cannot merge values."; + + mergeTypedOption = typeName: predicate: merge: list: + if all predicate list then merge list + else throw "Expect a ${typeName}."; + + mergeEnableOption = mergeTypedOption "boolean" + (x: true == x || false == x) (fold lib.or false); + + mergeListOption = mergeTypedOption "list" + __isList concatLists; + + mergeStringOption = mergeTypedOption "string" + (x: if builtins ? isString then builtins.isString x else x + "") + lib.concatStrings; + + mergeOneOption = list: + if list == [] then abort "This case should never happens." + else if tail list != [] then throw "Multiple definitions. Only one is allowed for this option." + else head list; + + + # Handle the traversal of option sets. All sets inside 'opts' are zipped + # and options declaration and definition are separated. If no option are + # declared at a specific depth, then the function recurse into the values. + # Other cases are handled by the optionHandler which contains two + # functions that are used to defined your goal. + # - export is a function which takes two arguments which are the option + # and the list of values. + # - notHandle is a function which takes the list of values are not handle + # by this function. + handleOptionSets = optionHandler@{export, notHandle, ...}: path: opts: + if all __isAttrs opts then + lib.zip (attr: opts: + let + # Compute the path to reach the attribute. + name = if path == "" then attr else path + "." + attr; + + # Divide the definitions of the attribute "attr" between + # declaration (isOption) and definitions (!isOption). + test = partition isOption opts; + decls = test.right; defs = test.wrong; + + # Return the option declaration and add missing default + # attributes. + opt = { + inherit name; + merge = mergeDefaultOption; + apply = lib.id; + } // (head decls); + + # Return the list of option sets. + optAttrs = map delayIf defs; + + # return the list of option values. + # Remove undefined values that are coming from evalIf. + optValues = filter (x: !isNotdef x) (map evalIf defs); + in + if decls == [] then handleOptionSets optionHandler name optAttrs + else lib.addErrorContext "while evaluating the option ${name}:" ( + if tail decls != [] then throw "Multiple options." + else export opt optValues + ) + ) opts + else lib.addErrorContext "while evaluating ${path}:" (notHandle opts); + + # Merge option sets and produce a set of values which is the merging of + # all options declare and defined. If no values are defined for an + # option, then the default value is used otherwise it use the merge + # function of each option to get the result. + mergeOptionSets = noOption: newMergeOptionSets; # ignore argument + newMergeOptionSets = + handleOptionSets { + export = opt: values: + opt.apply ( + if values == [] then + if opt ? default then opt.default + else throw "Not defined." + else opt.merge values + ); + notHandle = opts: throw "Used without option declaration."; + }; + + # Keep all option declarations. + filterOptionSets = + handleOptionSets { + export = opt: values: opt; + notHandle = opts: {}; + }; + + # Evaluate a list of option sets that would be merged with the + # function "merge" which expects two arguments. The attribute named + # "require" is used to imports option declarations and bindings. + # + # * cfg[0-9]: configuration + # * cfgSet[0-9]: configuration set + # + # merge: the function used to merge options sets. + # pkgs: is the set of packages available. (nixpkgs) + # opts: list of option sets or option set functions. + # config: result of this evaluation. + fixOptionSetsFun = merge: pkgs: opts: config: + let + # remove possible mkIf to access the require attribute. + noImportConditions = cfgSet0: + let cfgSet1 = delayIf cfgSet0; in + if cfgSet1 ? require then + cfgSet1 // { require = rmIf cfgSet1.require; } + else + cfgSet1; + + # call configuration "files" with one of the existing convention. + argumentHandler = cfg: + let + # {..} + cfg0 = cfg; + # {pkgs, config, ...}: {..} + cfg1 = cfg { inherit pkgs config merge; }; + # pkgs: config: {..} + cfg2 = cfg {} {}; + in + if __isFunction cfg0 then + if builtins.isAttrs cfg1 then cfg1 + else builtins.trace "Use '{pkgs, config, ...}:'." cfg2 + else cfg0; + + preprocess = cfg0: + let cfg1 = argumentHandler cfg0; + cfg2 = noImportConditions cfg1; + in cfg2; + + getRequire = x: toList (getAttr ["require"] [] (preprocess x)); + rmRequire = x: removeAttrs (preprocess x) ["require"]; + in + merge "" ( + map rmRequire ( + lib.uniqFlatten getRequire [] [] (toList opts) + ) + ); + + fixOptionSets = merge: pkgs: opts: + lib.fix (fixOptionSetsFun merge pkgs opts); + + optionAttrSetToDocList = l: attrs: + if (getAttr ["_type"] "" attrs) == "option" then + [({ + #inherit (attrs) description; + description = if attrs ? description then attrs.description else + throw ("No description ${toString l} : ${lib.whatis attrs}"); + } + // (if attrs ? example then {inherit(attrs) example;} else {} ) + // (if attrs ? default then {inherit(attrs) default;} else {} ) + // {name = l;} + )] + else (concatLists (map (s: (optionAttrSetToDocList + (l + (if l=="" then "" else ".") + s) (builtins.getAttr s attrs))) + (builtins.attrNames attrs))); + + + /* If. ThenElse. Always. */ + # !!! cleanup needed + + # create "if" statement that can be dealyed on sets until a "then-else" or + # "always" set is reached. When an always set is reached the condition + # is ignore. + + isIf = attrs: (typeOf attrs) == "if"; + mkIf = condition: thenelse: + if isIf thenelse then + mkIf (condition && thenelse.condition) thenelse.thenelse + else { + _type = "if"; + inherit condition thenelse; + }; + + + isNotdef = attrs: (typeOf attrs) == "notdef"; + mkNotdef = {_type = "notdef";}; + + + isThenElse = attrs: (typeOf attrs) == "then-else"; + mkThenElse = attrs: + assert attrs ? thenPart && attrs ? elsePart; + attrs // { _type = "then-else"; }; + + + isAlways = attrs: (typeOf attrs) == "always"; + mkAlways = value: { inherit value; _type = "always"; }; + + pushIf = f: attrs: + if isIf attrs then pushIf f ( + let val = attrs.thenelse; in + # evaluate the condition. + if isThenElse val then + if attrs.condition then + val.thenPart + else + val.elsePart + # ignore the condition. + else if isAlways val then + val.value + # otherwise + else + f attrs.condition val) + else + attrs; + + # take care otherwise you will have to handle this by hand. + rmIf = pushIf (condition: val: val); + + evalIf = pushIf (condition: val: + if condition then val else mkNotdef + ); + + delayIf = pushIf (condition: val: + # rewrite the condition on sub-attributes. + lib.mapAttrs (name: mkIf condition) val + ); + +} \ No newline at end of file diff --git a/pkgs/lib/sources.nix b/pkgs/lib/sources.nix new file mode 100644 index 000000000000..5a321bce7085 --- /dev/null +++ b/pkgs/lib/sources.nix @@ -0,0 +1,29 @@ +# Functions for copying sources to the Nix store. + +let lib = import ./default.nix; in + +rec { + + + # Bring in a path as a source, filtering out all Subversion and CVS + # directories, as well as backup files (*~). + cleanSource = + let filter = name: type: let baseName = baseNameOf (toString name); in ! ( + # Filter out Subversion and CVS directories. + (type == "directory" && (baseName == ".svn" || baseName == "CVS")) || + # Filter out backup files. + (lib.hasSuffix "~" baseName) + ); + in src: builtins.filterSource filter src; + + + # Get all files ending with the specified suffices from the given + # directory. E.g. `sourceFilesBySuffices ./dir [".xml" ".c"]'. + sourceFilesBySuffices = path: exts: + let filter = name: type: + let base = baseNameOf (toString name); + in type != "directory" && lib.any (ext: lib.hasSuffix ext base) exts; + in builtins.filterSource filter path; + + +} diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix new file mode 100644 index 000000000000..8986d9c42d98 --- /dev/null +++ b/pkgs/lib/strings.nix @@ -0,0 +1,85 @@ +/* String manipulation functions. */ + +let lib = import ./default.nix; in + +rec { + inherit (builtins) stringLength substring head tail lessThan sub; + + + # Concatenate a list of strings. + concatStrings = lib.fold (x: y: x + y) ""; + + + # Map a function over a list and concatenate the resulting strings. + concatMapStrings = f: list: concatStrings (map f list); + + + # Place an element between each element of a list, e.g., + # `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"]. + intersperse = separator: list: + if list == [] || tail list == [] + then list + else [(head list) separator] + ++ (intersperse separator (tail list)); + + + # Concatenate a list of strings with a separator between each element, e.g. + # concatStringsSep " " ["foo" "bar" "xyzzy"] == "foo bar xyzzy" + concatStringsSep = separator: list: + concatStrings (intersperse separator list); + + + # Construct an RPATH containing the libraries for a set of packages, + # e.g. "${pkg1}/lib:${pkg2}/lib:...". + makeLibraryPath = paths: concatStringsSep ":" (map (path: path + "/lib") paths); + + + # Dependening on the boolean `cond', return either the given string + # or the empty string. + optionalString = cond: string: if cond then string else ""; + + + # Determine whether a filename ends in the given suffix. + hasSuffix = ext: fileName: + let lenFileName = stringLength fileName; + lenExt = stringLength ext; + in !(lessThan lenFileName lenExt) && + substring (sub lenFileName lenExt) lenFileName fileName == ext; + + + # Convert a string to a list of characters (i.e. singleton strings). + # For instance, "abc" becomes ["a" "b" "c"]. This allows you to, + # e.g., map a function over each character. However, note that this + # will likely be horribly inefficient; Nix is not a general purpose + # programming language. Complex string manipulations should, if + # appropriate, be done in a derivation. + stringToCharacters = s: let l = stringLength s; in + if l == 0 + then [] + else [(substring 0 1 s)] ++ stringToCharacters (substring 1 (builtins.sub l 1) s); + + + # !!! this function seems broken - it doesn't escape all special + # characters, and in any case this should be done in a builder. + escapeShellArg = s: + let escapeChar = x: if x == "'" then "'\"'\"'" else x; + in "'" + concatStrings (map escapeChar (stringToCharacters s)) + "'"; + + + # !!! what is this for? + defineShList = name: list: "\n${name}=(${concatStringsSep " " (map escapeShellArg list)})\n"; + + + # arg: http://foo/bar/bz.ext returns bz.ext + # !!! isn't this what the `baseNameOf' primop does? + dropPath = s : + if s == "" then "" else + let takeTillSlash = left : c : s : + if left == 0 then s + else if (__substring left 1 s == "/") then + (__substring (__add left 1) (__sub c 1) s) + else takeTillSlash (__sub left 1) (__add c 1) s; in + takeTillSlash (__sub (__stringLength s) 1) 1 s; + + +} \ No newline at end of file diff --git a/pkgs/lib/trivial.nix b/pkgs/lib/trivial.nix new file mode 100644 index 000000000000..a4fbd164fe57 --- /dev/null +++ b/pkgs/lib/trivial.nix @@ -0,0 +1,18 @@ +rec { + + # Identity function. + id = x: x; + + # Constant function. + const = x: y: x; + + # Named versions corresponding to some builtin operators. + concat = x: y: x ++ y; + or = x: y: x || y; + and = x: y: x && y; + mergeAttrs = x : y : x // y; + + # Take a function and evaluate it with its own returned value. + fix = f: let result = f result; in result; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a948c7440656..e486f0ecf27a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5303,7 +5303,7 @@ let }; perlTaskCatalystTutorial = buildPerlPackage { - name = "Task-Catalyst-Tutorial"; + name = "Task-Catalyst-Tutorial-0.03"; src = fetchurl { url = mirror://cpan/authors/id/J/JR/JROCKWAY/Task-Catalyst-Tutorial-0.03.tar.gz; sha256 = "1f9nqg8h455s8dah482hf78i3h2bilji26i5m3lzr2cxws98lsak"; @@ -7480,12 +7480,10 @@ let firefox3Wrapper = wrapFirefox firefox3 "firefox" ""; firefox3b1BinWrapper = lowPrio (wrapFirefox firefox3b1Bin "firefox" ""); - flacAlts = import ../applications/audio/flac { + flac = import ../applications/audio/flac { inherit fetchurl stdenv libogg; }; - flac = getVersion "flac" flacAlts; - flashplayer = flashplayer10; flashplayer9 = import ../applications/networking/browsers/mozilla-plugins/flashplayer-9 { @@ -8618,7 +8616,6 @@ let saneBackends chmlib python libzip gmp sqlite libidn runCommand lib openbabel ocaml facile stdenv jasper fam indilib libnova libarchive dbus bison; - #flac = builtins.getAttr "1.1.2" flacAlts; cdparanoia = cdparanoiaIII; inherit (xlibs) inputproto kbproto scrnsaverproto xextproto xf86miscproto diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 4efed47f6d0b..2012278ffd7b 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -12,6 +12,8 @@ args: with args; with stringsWithDeps; with lib; "README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++ (optional (getAttr ["forceCopyDoc"] true args) "doc"); + hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b); + archiveType = s: (if hasSuffixHack ".tar" s then "tar" else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" From f9b9844949deb54bf4e3707bc7d47bd50d45635c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Feb 2009 17:03:18 +0000 Subject: [PATCH 29/59] * Doh. svn path=/nixpkgs/trunk/; revision=14014 --- pkgs/lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index ee3b1ad085d9..87789a196036 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -6,7 +6,7 @@ let attrsets = import ./attrsets.nix; sources = import ./sources.nix; options = import ./options.nix; - debug = import ./attrsets.nix; + debug = import ./debug.nix; misc = import ./misc.nix; in From 921b7d3c6948fca1e758b99ea186a386685358ea Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 9 Feb 2009 20:37:11 +0000 Subject: [PATCH 30/59] Added Cuneiform OCR. Works somehow.. svn path=/nixpkgs/trunk/; revision=14015 --- pkgs/tools/graphics/cuneiform/default.nix | 39 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/tools/graphics/cuneiform/default.nix diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix new file mode 100644 index 000000000000..2eddf1aaa1bd --- /dev/null +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -0,0 +1,39 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.getAttr ["version"] "0.6" a; + buildInputs = with a; [ + cmake imagemagick patchelf + ]; +in +rec { + src = fetchurl { + url = "http://launchpad.net/cuneiform-linux/${version}/${version}/+download/cuneiform-${version}.tar.bz2"; + sha256 = "0jgiccimwv1aqp9gzl9937gdlh9zl5qpaygf0n1xcbfd5aqz14ig"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doCmake" "doMakeInstall" "postInstall"]; + + libc = if a.stdenv ? glibc then a.stdenv.glibc else null; + + doCmake = a.FullDepEntry('' + ensureDir $PWD/builddir + cd builddir + export NIX_LDFLAGS="$NIX_LDFLAGS -ldl -L$out/lib" + cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc}/lib + '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; + + postInstall = a.FullDepEntry('' + patchelf --set-rpath $out/lib:${a.stdenv.gcc.gcc}/lib $out/bin/cuneiform + '') ["minInit" "addInputs" "doMakeInstall"]; + + name = "cuneiform-" + version; + meta = { + description = "Cuneiform OCR"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e486f0ecf27a..f675ac2cda45 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7244,6 +7244,11 @@ let inherit fetchurl stdenv; }; + cuneiform = builderDefsPackage (import ../tools/graphics/cuneiform) { + inherit cmake patchelf; + imagemagick=imagemagick; + }; + cvs = import ../applications/version-management/cvs { inherit fetchurl stdenv nano; }; From 18cc7f4b378b9938de574ef04b2567510eecb66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 9 Feb 2009 20:44:26 +0000 Subject: [PATCH 31/59] Adding comical-0.8 svn path=/nixpkgs/trunk/; revision=14016 --- .../applications/graphics/comical/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/applications/graphics/comical/default.nix diff --git a/pkgs/applications/graphics/comical/default.nix b/pkgs/applications/graphics/comical/default.nix new file mode 100644 index 000000000000..db6f57468256 --- /dev/null +++ b/pkgs/applications/graphics/comical/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, wxGTK, utillinux, zlib }: + +stdenv.mkDerivation { + name = "comical-0.8"; + src = fetchurl { + url = mirror://sourceforge/comical/comical-0.8.tar.gz; + sha256 = "0b6527cc06b25a937041f1eb248d0fd881cf055362097036b939817f785ab85e"; + }; + buildInputs = [ wxGTK utillinux zlib ]; + patchPhase = '' + sed -i -e 's@"zlib\\.h"@@' unzip/unzip.h + sed -i -e 's@/usr/local@'$out@ \ + -e 's@-lminiunzip@-lminiunzip -lz@' Makefile + ''; + + installPhase = "mkdir -p $out/bin ; make install"; + + meta = { + description = "Viewer of CBR and CBZ files, often used to store scanned comics"; + homepage = http://comical.sourceforge.net/; + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f675ac2cda45..f549486f20b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7240,6 +7240,11 @@ let python = pythonFull; }; + comical = import ../applications/graphics/comical { + inherit stdenv fetchurl utillinux zlib; + inherit wxGTK; + }; + cua = import ../applications/editors/emacs-modes/cua { inherit fetchurl stdenv; }; From 21fd05797cb05f3491a82bc0786708031203e4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 9 Feb 2009 22:44:36 +0000 Subject: [PATCH 32/59] Adding GPL Arcade Volleyball. I had this patch _almost_ ready for a long long time. Now ready. svn path=/nixpkgs/trunk/; revision=14017 --- pkgs/games/gav/default.nix | 23 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/games/gav/default.nix diff --git a/pkgs/games/gav/default.nix b/pkgs/games/gav/default.nix new file mode 100644 index 000000000000..d525e0a372f9 --- /dev/null +++ b/pkgs/games/gav/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, SDL, SDL_image, SDL_mixer, SDL_net} : + +stdenv.mkDerivation { + name = "gav-0.9.0"; + + src = fetchurl { + url = "mirror://sourceforge/gav/gav-0.9.0.tar.gz"; + sha256 = "8f0deb8b2cd775b339229054f4f282583a4cfbcba9d27a6213cf910bab944f3e"; + }; + + patchPhase = '' + mkdir -p $out/bin + sed -e "s@/usr@$out@" -i Makefile + sed -e "s@/usr@$out@" -i Theme.h + ''; + buildInputs = [SDL SDL_image SDL_mixer SDL_net]; + + meta = { + description = "Remake of AV Arcade Volleyball"; + homepage = http://gav.sourceforge.net/; + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f549486f20b0..621928406ac4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2965,6 +2965,10 @@ let inherit (gtkLibs) glib; }; + gav = import ../games/gav { + inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_net; + }; + gdbm = import ../development/libraries/gdbm { inherit fetchurl stdenv; }; From 268148c794e542399a68e1473dd55b87ccb85ef8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 11:06:41 +0000 Subject: [PATCH 33/59] * Latest NVIDIA driver. Hopefully this fixes my suspend-to-RAM problems. Also, use the pkg0 download, since pkg1/pkg2 apparently just contain precompiled modules that we don't need. svn path=/nixpkgs/trunk/; revision=14018 --- pkgs/os-specific/linux/nvidia/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia/default.nix b/pkgs/os-specific/linux/nvidia/default.nix index abb7eef04438..4fe6529583ae 100644 --- a/pkgs/os-specific/linux/nvidia/default.nix +++ b/pkgs/os-specific/linux/nvidia/default.nix @@ -2,7 +2,7 @@ let - versionNumber = "180.22"; + versionNumber = "180.29"; in @@ -14,13 +14,13 @@ stdenv.mkDerivation { src = if stdenv.system == "i686-linux" then fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg1.run"; - sha256 = "0cp6ii14pm8kzy1fy1qx2id2fp0lmb02akddid8wwdca7xpczqg7"; + url = "ftp://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; + sha256 = "17wgg5rf5384bxng9ygwarf4imvvg069zihfvvvmahg1b0fsipvq"; } else if stdenv.system == "x86_64-linux" then fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg2.run"; - sha256 = "0yycsr8i5cc8bnqwvfrk0v9d7gxxv42zqdpz9ki8vxil7lvjfdxv"; + url = "ftp://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run"; + sha256 = "1w7a67s5df8i5lbr2r980l674wvrqzzys1zdwcla267zy109rp5d"; } else throw "nvidia-x11 does not support platform ${stdenv.system}"; From 5e3c509cb81cfcc5c657de9c91134004b3863627 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 11:10:12 +0000 Subject: [PATCH 34/59] * Latest kernels. svn path=/nixpkgs/trunk/; revision=14019 --- pkgs/os-specific/linux/kernel/linux-2.6.27.nix | 4 ++-- pkgs/os-specific/linux/kernel/linux-2.6.28.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.27.nix b/pkgs/os-specific/linux/kernel/linux-2.6.27.nix index e0f8e953c101..f6632d95ace6 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.27.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.27.nix @@ -5,11 +5,11 @@ assert !userModeLinux; import ./generic.nix ( rec { - version = "2.6.27.13"; + version = "2.6.27.15"; src = fetchurl { url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2"; - sha256 = "1zxyid70nlzxmx08mrg6a2vafqvs6q1szlcix417d1qq52c88l9i"; + sha256 = "17n8q425q5xix2fd1ig5gbpfjhy18wggd27pyaxi7vvxa9ihm969"; }; features = { diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix index b9ed7d3dfa3f..628df9391a81 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.28.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.28.nix @@ -5,11 +5,11 @@ assert !userModeLinux; import ./generic.nix ( rec { - version = "2.6.28.3"; + version = "2.6.28.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2"; - sha256 = "1n4wqiyfx17dnsr696c3zanmlsy0ffhgaahiyn28cyd77v6wf2mv"; + sha256 = "1k45azdjv4i9hh76nbi442vsfpwz31736aq3la2pn5avmkwiz2mm"; }; features = { From 646767fdecbadeb192a7ef1bca1044e60dc38c2c Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 10 Feb 2009 13:54:05 +0000 Subject: [PATCH 35/59] Fixing Cuneiform for non-Linux platform svn path=/nixpkgs/trunk/; revision=14020 --- pkgs/tools/graphics/cuneiform/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index 2eddf1aaa1bd..e037a8165a26 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -19,7 +19,7 @@ rec { /* doConfigure should be removed if not needed */ phaseNames = ["doCmake" "doMakeInstall" "postInstall"]; - libc = if a.stdenv ? glibc then a.stdenv.glibc else null; + libc = if a.stdenv ? glibc then a.stdenv.glibc else ""; doCmake = a.FullDepEntry('' ensureDir $PWD/builddir From b2ccd56224a60e7ae4f5a6cb1b740ba3485fd3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 10 Feb 2009 14:35:11 +0000 Subject: [PATCH 36/59] GNU IceCat 3.0.6-g1. svn path=/nixpkgs/trunk/; revision=14021 --- .../networking/browsers/icecat-3/default.nix | 11 ++++------- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/icecat-3/default.nix b/pkgs/applications/networking/browsers/icecat-3/default.nix index cd786c2b014c..39ce47ef0660 100644 --- a/pkgs/applications/networking/browsers/icecat-3/default.nix +++ b/pkgs/applications/networking/browsers/icecat-3/default.nix @@ -1,28 +1,25 @@ -{ stdenv, fetchurl, lzma, pkgconfig, gtk, pango, perl, python, zip, libIDL +{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL , libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs , gnomevfs, libgnomeui , freetype, fontconfig , application ? "browser" }: -let version = "3.0.5-g1"; in +let version = "3.0.6-g1"; in stdenv.mkDerivation { name = "icecat-${version}"; src = fetchurl { - url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.lzma"; - sha256 = "15s71zjwiqpaqsmjzk5kxwamxzkb3p7172dbazqyxmgvca9yw8bs"; + url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.bz2"; + sha256 = "0lcxvlviwgaj9w6ywn0656a2y3qdxdlw0mf5f9ljdd9jpw4fxjih"; }; buildInputs = [ - lzma libgnomeui gnomevfs pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 python dbus dbus_glib pango freetype fontconfig xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt ]; - unpackCmd = "lzma -d < $src | tar xv"; - patches = [ ./skip-gre-registration.patch ]; configureFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 621928406ac4..955762ecb930 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7603,14 +7603,14 @@ let }; icecat3 = lowPrio (import ../applications/networking/browsers/icecat-3 { - inherit fetchurl stdenv lzma pkgconfig perl zip libjpeg libpng zlib cairo + inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo python dbus dbus_glib freetype fontconfig bzip2 xlibs; inherit (gnome) libIDL libgnomeui gnomevfs gtk pango; }); icecatXulrunner3 = lowPrio (import ../applications/networking/browsers/icecat-3 { application = "xulrunner"; - inherit fetchurl stdenv lzma pkgconfig perl zip libjpeg libpng zlib cairo + inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo python dbus dbus_glib freetype fontconfig bzip2 xlibs; inherit (gnome) libIDL libgnomeui gnomevfs gtk pango; }); From 0cf9849afd0db06dc70a938000b545099c06eb43 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 15:48:30 +0000 Subject: [PATCH 37/59] * More refactoring: move all the stdenv adapter functions (like useDietlibc) to a separate file. all-packages.nix should really only contain package composition stuff. svn path=/nixpkgs/trunk/; revision=14022 --- pkgs/stdenv/adapters.nix | 111 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 98 ++-------------------------- 2 files changed, 115 insertions(+), 94 deletions(-) create mode 100644 pkgs/stdenv/adapters.nix diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix new file mode 100644 index 000000000000..ff4de11bc8b7 --- /dev/null +++ b/pkgs/stdenv/adapters.nix @@ -0,0 +1,111 @@ +/* This file contains various functions that take a stdenv and return + a new stdenv with different behaviour, e.g. using a different C + compiler. */ + +{dietlibc, fetchurl, runCommand}: + + +rec { + + + # Override the compiler in stdenv for specific packages. + overrideGCC = stdenv: gcc: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // { NIX_GCC = gcc; }); + }; + + + # Add some arbitrary packages to buildInputs for specific packages. + # Used to override packages in stenv like Make. Should not be used + # for other dependencies. + overrideInStdenv = stdenv: pkgs: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // + { buildInputs = (if args ? buildInputs then args.buildInputs else []) ++ pkgs; } + ); + }; + + + # Override the setup script of stdenv. Useful for testing new + # versions of the setup script without causing a rebuild of + # everything. + # + # Example: + # randomPkg = import ../bla { ... + # stdenv = overrideSetup stdenv ../stdenv/generic/setup-latest.sh; + # }; + overrideSetup = stdenv: setup: stdenv.regenerate setup; + + + # Return a modified stdenv that uses dietlibc to create small + # statically linked binaries. + useDietLibC = stdenv: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // { + NIX_CFLAGS_LINK = "-static"; + + # libcompat.a contains some commonly used functions. + NIX_LDFLAGS = "-lcompat"; + + # These are added *after* the command-line flags, so we'll + # always optimise for size. + NIX_CFLAGS_COMPILE = + (if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "") + + " -Os -s -D_BSD_SOURCE=1"; + + configureFlags = + (if args ? configureFlags then args.configureFlags else "") + + " --disable-shared"; # brrr... + + NIX_GCC = import ../build-support/gcc-wrapper { + inherit stdenv; + libc = dietlibc; + inherit (stdenv.gcc) gcc binutils name nativeTools nativePrefix; + nativeLibc = false; + }; + }); + isDietLibC = true; + } // {inherit fetchurl;}; + + + # Return a modified stdenv that uses klibc to create small + # statically linked binaries. + useKlibc = stdenv: klibc: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // { + NIX_CFLAGS_LINK = "-static"; + + # These are added *after* the command-line flags, so we'll + # always optimise for size. + NIX_CFLAGS_COMPILE = + (if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "") + + " -Os -s"; + + configureFlags = + (if args ? configureFlags then args.configureFlags else "") + + " --disable-shared"; # brrr... + + NIX_GCC = runCommand "klibc-wrapper" {} '' + ensureDir $out/bin + ln -s ${klibc}/bin/klcc $out/bin/gcc + ln -s ${klibc}/bin/klcc $out/bin/cc + ensureDir $out/nix-support + echo 'PATH=$PATH:${stdenv.gcc.binutils}/bin' > $out/nix-support/setup-hook + ''; + }); + isKlibc = true; + isStatic = true; + } // {inherit fetchurl;}; + + + # Return a modified stdenv that tries to build statically linked + # binaries. + makeStaticBinaries = stdenv: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // { + NIX_CFLAGS_LINK = "-static"; + + configureFlags = + (if args ? configureFlags then args.configureFlags else "") + + " --disable-shared"; # brrr... + }); + isStatic = true; + } // {inherit fetchurl;}; + + +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 955762ecb930..f861bea95a08 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -106,105 +106,11 @@ let inherit lib config getConfig; - # Override the compiler in stdenv for specific packages. - overrideGCC = stdenv: gcc: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // { NIX_GCC = gcc; }); - }; - - # Add some arbitrary packages to buildInputs for specific packages. - # Used to override packages in stenv like Make. Should not be used - # for other dependencies. - overrideInStdenv = stdenv: pkgs: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // - { buildInputs = (if args ? buildInputs then args.buildInputs else []) ++ pkgs; } - ); - }; - addAttrsToDerivation = extraAttrs: stdenv: stdenv // { mkDerivation = args: stdenv.mkDerivation (args // extraAttrs); }; - # Override the setup script of stdenv. Useful for testing new - # versions of the setup script without causing a rebuild of - # everything. - # - # Example: - # randomPkg = import ../bla { ... - # stdenv = overrideSetup stdenv ../stdenv/generic/setup-latest.sh; - # }; - overrideSetup = stdenv: setup: stdenv.regenerate setup; - stdenvNew = overrideSetup stdenv ../stdenv/generic/setup-new.sh; - # Return a modified stdenv that uses dietlibc to create small - # statically linked binaries. - useDietLibC = stdenv: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // { - NIX_CFLAGS_LINK = "-static"; - - # libcompat.a contains some commonly used functions. - NIX_LDFLAGS = "-lcompat"; - - # These are added *after* the command-line flags, so we'll - # always optimise for size. - NIX_CFLAGS_COMPILE = - (if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "") - + " -Os -s -D_BSD_SOURCE=1"; - - configureFlags = - (if args ? configureFlags then args.configureFlags else "") - + " --disable-shared"; # brrr... - - NIX_GCC = import ../build-support/gcc-wrapper { - inherit stdenv; - libc = dietlibc; - inherit (gcc) gcc binutils name nativeTools nativePrefix; - nativeLibc = false; - }; - }); - isDietLibC = true; - } // {inherit fetchurl;}; - - # Return a modified stdenv that uses klibc to create small - # statically linked binaries. - useKlibc = stdenv: klibc: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // { - NIX_CFLAGS_LINK = "-static"; - - # These are added *after* the command-line flags, so we'll - # always optimise for size. - NIX_CFLAGS_COMPILE = - (if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "") - + " -Os -s"; - - configureFlags = - (if args ? configureFlags then args.configureFlags else "") - + " --disable-shared"; # brrr... - - NIX_GCC = runCommand "klibc-wrapper" {} '' - ensureDir $out/bin - ln -s ${klibc}/bin/klcc $out/bin/gcc - ln -s ${klibc}/bin/klcc $out/bin/cc - ensureDir $out/nix-support - echo 'PATH=$PATH:${stdenv.gcc.binutils}/bin' > $out/nix-support/setup-hook - ''; - }); - isKlibc = true; - isStatic = true; - } // {inherit fetchurl;}; - - # Return a modified stdenv that tries to build statically linked - # binaries. - makeStaticBinaries = stdenv: stdenv // - { mkDerivation = args: stdenv.mkDerivation (args // { - NIX_CFLAGS_LINK = "-static"; - - configureFlags = - (if args ? configureFlags then args.configureFlags else "") - + " --disable-shared"; # brrr... - }); - isStatic = true; - } // {inherit fetchurl;}; - # Applying this to an attribute set will cause nix-env to look # inside the set for derivations. recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;}; @@ -322,6 +228,10 @@ let else stdenv; + inherit (import ../stdenv/adapters.nix {inherit (pkgs) dietlibc fetchurl runCommand;}) + overrideGCC overrideInStdenv overrideSetup + useDietLibC useKlibc makeStaticBinaries; + ### BUILD SUPPORT From 3989a4ed4adccc1d98ffc968df6ad3d723106009 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 16:09:43 +0000 Subject: [PATCH 38/59] * gcc.gcc may be null. svn path=/nixpkgs/trunk/; revision=14023 --- pkgs/tools/graphics/cuneiform/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index e037a8165a26..103178fbb396 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -29,7 +29,7 @@ rec { '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; postInstall = a.FullDepEntry('' - patchelf --set-rpath $out/lib:${a.stdenv.gcc.gcc}/lib $out/bin/cuneiform + patchelf --set-rpath $out/lib${if a.stdenv.gcc.gcc != null then ":${a.stdenv.gcc.gcc}/lib" else ""} $out/bin/cuneiform '') ["minInit" "addInputs" "doMakeInstall"]; name = "cuneiform-" + version; From efbfa0c39535bfa8a10f02950560694581f7790e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 23:11:29 +0000 Subject: [PATCH 39/59] * Latest lsof. svn path=/nixpkgs/trunk/; revision=14025 --- pkgs/development/tools/misc/lsof/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 65a01a8615ae..9468b707f372 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -1,14 +1,14 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "lsof-4.80"; + name = "lsof-4.81"; src = fetchurl { urls = [ - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.80.tar.bz2 - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/lsof_4.80.tar.bz2 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.81.tar.bz2 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/lsof_4.81.tar.bz2 ]; - sha256 = "1q0k3c9ajpdxkhqq793pl4fdfnrwl5hgwk9556gvcj96hllssgbr"; + sha256 = "1fcamd8qpczgb3kz9b2rhflbq6lyd3lic4i7xl7n99fx76ha1n19"; }; unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); "; From efa1bf9cb57c4fd52641403563324c0c9bf343b4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 23:12:18 +0000 Subject: [PATCH 40/59] * Added acpid, a daemon that monitors ACPI events. svn path=/nixpkgs/trunk/; revision=14026 --- pkgs/os-specific/linux/acpid/default.nix | 20 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/os-specific/linux/acpid/default.nix diff --git a/pkgs/os-specific/linux/acpid/default.nix b/pkgs/os-specific/linux/acpid/default.nix new file mode 100644 index 000000000000..876152472639 --- /dev/null +++ b/pkgs/os-specific/linux/acpid/default.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "acpid-1.0.8"; + + src = fetchurl { + url = mirror://sourceforge/acpid/acpid-1.0.8.tar.gz; + sha256 = "1cdp4vql8ya073b42mjpzpzzn1py00baazq91837vhrq5hqfaynm"; + }; + + preBuild = '' + makeFlagsArray=(BINDIR=$out/bin SBINDIR=$out/sbin MAN8DIR=$out/share/man/man8) + ''; + + meta = { + homepage = http://acpid.sourceforge.net/; + description = "A daemon for delivering ACPI events to userspace programs"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f861bea95a08..af9650797119 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5905,6 +5905,10 @@ let inherit fetchurl stdenv; }; + acpid = import ../os-specific/linux/acpid { + inherit fetchurl stdenv; + }; + acpitool = import ../os-specific/linux/acpitool { inherit fetchurl stdenv; }; From 79d3e0926d68bb760f1a9f28c862c38e6cd8cc45 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2009 23:29:42 +0000 Subject: [PATCH 41/59] * Started documenting the meta attributes, including a first (very incomplete) attempt at standardising the license attribute. svn path=/nixpkgs/trunk/; revision=14028 --- doc/manual.xml | 1 + doc/meta.xml | 200 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 doc/meta.xml diff --git a/doc/manual.xml b/doc/manual.xml index b067549e8fdf..a16b783af310 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -31,6 +31,7 @@ + diff --git a/doc/meta.xml b/doc/meta.xml new file mode 100644 index 000000000000..5e53609a2368 --- /dev/null +++ b/doc/meta.xml @@ -0,0 +1,200 @@ + + +Meta-attributes + +Nix packages can declare meta-attributes +that contain information about a package such as a description, its +homepage, its license, and so on. For instance, the GNU Hello package +has a meta declaration like this: + + +meta = { + description = "A program that produces a familiar, friendly greeting"; + longDescription = '' + GNU Hello is a program that prints "Hello, world!" when you run it. + It is fully customizable. + ''; + homepage = http://www.gnu.org/software/hello/manual/; + license = "GPLv3+"; +}; + + + + +Meta-attributes are not passed to the builder of the package. +Thus, a change to a meta-attribute doesn’t trigger a recompilation of +the package. The value of a meta-attribute must a string. + +The meta-attributes of a package can be queried from the +command-line using nix-env: + + +$ nix-env -qa hello --meta --xml +<?xml version='1.0' encoding='utf-8'?> +<items> + <item attrPath="hello" name="hello-2.3" system="i686-linux"> + <meta name="description" value="A program that produces a familiar, friendly greeting" /> + <meta name="homepage" value="http://www.gnu.org/software/hello/manual/" /> + <meta name="license" value="GPLv3+" /> + <meta name="longDescription" value="GNU Hello is a program that prints &quot;Hello, world!&quot; when you run it.&#xA;It is fully customizable.&#xA;" /> + </item> +</items> + + +nix-env knows about the +description field specifically: + + +$ nix-env -qa hello --description +hello-2.3 A program that produces a familiar, friendly greeting + + + + + +
Standard meta-attributes + +The following meta-attributes have a standard +interpretation: + + + + + description + A short (one-line) description of the package. + Don’t include a period at the end. This is shown by + nix-env -q --description and also on the + Nixpkgs release pages. Example: "A program that produces + a familiar, friendly greeting" + + + + longDescription + An arbitrarily long description of the + package. + + + + homepage + The package’s homepage. Example: + http://www.gnu.org/software/hello/manual/ + + + + license + The license for the package. See below for the + allowed values. + + + + priority + The priority of the package, + used by nix-env to resolve file name conflicts + between packages. See the Nix manual page for + nix-env for details. Example: + "10" (a low-priority + package). + + + + + +
+ + +
Licenses + +This is just a first attempt at standardising the license +attribute. + +The meta.license attribute must be one of the +following: + + + + + GPL + GNU General Public License; version not + specified. + + + + GPLv2 + GNU General Public License, version + 2. + + + + GPLv2+ + GNU General Public License, version + 2 or higher. + + + + GPLv3 + GNU General Public License, version + 3. + + + + GPLv3+ + GNU General Public License, version + 3 or higher. + + + + free + Catch-all for free software licenses not listed + above. + + + + free-copyleft + Catch-all for free, copyleft software licenses not + listed above. + + + + unfree-redistributable + Unfree package that can be redistributed in binary + form. That is, it’s legal to redistribute the + output of the derivation. This means that + the package can be included in the Nixpkgs + channel. + + Sometimes proprietary software can only be redistributed + unmodified. Make sure the builder doesn’t actually modify the + original binaries; otherwise we’re breaking the license. For + instance, the NVIDIA X11 drivers can be redistributed unmodified, + but our builder applies patchelf to make them + work. Thus, its license is unfree and it + cannot be included in the Nixpkgs channel. + + + + unfree + Unfree package that cannot be redistributed. You + can build it yourself, but you cannot redistribute the output of + the derivation. Thus it cannot be included in the Nixpkgs + channel. + + + + unfree-redistributable-firmware + This package supplies unfree, redistributable + firmware. This is a separate value from + unfree-redistributable because not everybody + cares whether firmware is free. + + + + + + + +
+ + +
From f94091ad093a49043548b31bc727355e4e21fd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 11 Feb 2009 08:48:46 +0000 Subject: [PATCH 42/59] BitlBee 1.2.3. svn path=/nixpkgs/trunk/; revision=14030 --- .../instant-messengers/bitlbee/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix index 2dfce27d313c..23ae06841381 100644 --- a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix +++ b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix @@ -1,17 +1,30 @@ -args: with args; +{ fetchurl, stdenv, gnutls, glib, pkgconfig }: stdenv.mkDerivation rec { - name = "bitlbee-1.2.1"; + name = "bitlbee-1.2.3"; + src = fetchurl { url = "mirror://bitlbee/src/" + name + ".tar.gz"; - sha256 = "01ld349f5k89lk6j7xn4sdbbf1577kp845vmnj3sfaza9s1fhm26"; + sha256 = "1qj5cx0lqhg6dy2gdjb05ap963r84rv1b96iz23c97c2ihc31fqc"; }; buildInputs = [ gnutls glib pkgconfig ]; meta = { - description = ''BitlBee, an IRC to other chat networks gateway.''; + description = "BitlBee, an IRC to other chat networks gateway"; + + longDescription = '' + BitlBee brings IM (instant messaging) to IRC clients. It's a + great solution for people who have an IRC client running all the + time and don't want to run an additional MSN/AIM/whatever + client. + + BitlBee currently supports the following IM networks/protocols: + XMPP/Jabber (including Google Talk), MSN Messenger, Yahoo! + Messenger, AIM and ICQ. + ''; + homepage = http://www.bitlbee.org/; - license = "GPL"; + license = "GPLv2+"; }; } From 05eb6625ed653a832a087caaddcb5a228dfeba3d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 11 Feb 2009 10:02:10 +0000 Subject: [PATCH 43/59] Bumped boost libraries to version 1.38.0. svn path=/nixpkgs/trunk/; revision=14031 --- pkgs/development/libraries/boost/1.38.0.nix | 20 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/boost/1.38.0.nix diff --git a/pkgs/development/libraries/boost/1.38.0.nix b/pkgs/development/libraries/boost/1.38.0.nix new file mode 100644 index 000000000000..10058386c502 --- /dev/null +++ b/pkgs/development/libraries/boost/1.38.0.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, version }: + +assert version == "1.38.0"; + +stdenv.mkDerivation { + name = "boost-1.38.0"; + meta = { + homepage = "http://boost.org/"; + description = "Boost C++ Library Collection"; + license = "boost-license"; + }; + src = fetchurl { + url = "mirror://sourceforge/boost/boost_1_38_0.tar.bz2"; + sha256 = "1bs3b11y66xkdqjl38xb20hipx0pjr0h72fj6755655j6b4kz37z"; + }; + buildInputs = [icu expat zlib bzip2 python]; + preConfigure = + "sed -e 's@^BJAM_CONFIG=\"\"@BJAM_CONFIG=\"-sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=system variant=debug,release threading=single,multi link=shared,static\"@g' -i configure"; + configureFlags = "--with-icu=${icu} --with-python=${python}"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index af9650797119..cc86a16b029c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2670,7 +2670,7 @@ let boostVersionChoice = version: selectVersion ../development/libraries/boost version { inherit fetchurl stdenv icu expat zlib bzip2 python; }; - boost = boostVersionChoice "1.37.0"; + boost = boostVersionChoice "1.38.0"; buddy = import ../development/libraries/buddy { inherit fetchurl stdenv; @@ -7705,7 +7705,7 @@ let }; mozplugger = builderDefsPackage (import ../applications/networking/browsers/mozilla-plugins/mozplugger) { - inherit firefox; + inherit firefox; inherit (xlibs) libX11 xproto; }; From 3fb26823cd15422e9e4374ab7bc8c6e836931541 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 11 Feb 2009 10:02:18 +0000 Subject: [PATCH 44/59] Use correct hash for boost 1.38.0. Oops. svn path=/nixpkgs/trunk/; revision=14032 --- pkgs/development/libraries/boost/1.38.0.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/1.38.0.nix b/pkgs/development/libraries/boost/1.38.0.nix index 10058386c502..1416e124471a 100644 --- a/pkgs/development/libraries/boost/1.38.0.nix +++ b/pkgs/development/libraries/boost/1.38.0.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { }; src = fetchurl { url = "mirror://sourceforge/boost/boost_1_38_0.tar.bz2"; - sha256 = "1bs3b11y66xkdqjl38xb20hipx0pjr0h72fj6755655j6b4kz37z"; + sha256 = "0rk044s4m7l4sma6anml34vxcd9w0fzcy1cy7csbzynjyida9qry"; }; buildInputs = [icu expat zlib bzip2 python]; preConfigure = From ca5e6b9624c39bb262e5580613a421de2bedea0f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Feb 2009 14:53:17 +0000 Subject: [PATCH 45/59] svn path=/nixpkgs/trunk/; revision=14033 --- pkgs/misc/tex/nix/find-includes.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/tex/nix/find-includes.pl b/pkgs/misc/tex/nix/find-includes.pl index 9e5fd112bac9..eb36cefc7de6 100644 --- a/pkgs/misc/tex/nix/find-includes.pl +++ b/pkgs/misc/tex/nix/find-includes.pl @@ -82,7 +82,7 @@ while (scalar @workset > 0) { } elsif (/\\includegraphics(\[.*\])?\{(.*)\}/) { my $fn2 = $2; die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/"; - addToWorkSetExts("$path/$fn2", ".pdf", ".png", ".ps"); + addToWorkSetExts("$path/$fn2", ".pdf", ".png", ".ps", ".jpg"); } elsif (/\\pgfdeclareimage(\[.*\])?\{.*\}\{(.*)\}/) { my $fn2 = $2; die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/"; From 944d6221df8c60d0e2741bc9fd5e14d62f1e8ee5 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Wed, 11 Feb 2009 16:12:12 +0000 Subject: [PATCH 46/59] my-env: add some hackish support for zsh svn path=/nixpkgs/trunk/; revision=14034 --- pkgs/misc/my-env/default.nix | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index 2bf2d86c2c81..4d06a8b5c8e3 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -69,7 +69,40 @@ mkDerivation { phases= # only do all the setup stuff in nix-support/* set +e - source "$s" + if [[ -z "\$ZSH_VERSION" ]]; then + source "$s" + else + setopt interactivecomments + # fix bash indirection + # let's hope the bash arrays aren't used + # substitute is using bash array, so skip it + echo ' + setopt NO_BAD_PATTERN + setopt NO_BANG_HIST + setopt NO_BG_NICE + setopt NO_EQUALS + setopt NO_FUNCTION_ARGZERO + setopt GLOB_SUBST + setopt NO_HUP + setopt INTERACTIVE_COMMENTS + setopt KSH_ARRAYS + setopt NO_MULTIOS + setopt NO_NOMATCH + setopt RM_STAR_SILENT + setopt POSIX_BUILTINS + setopt SH_FILE_EXPANSION + setopt SH_GLOB + setopt SH_OPTION_LETTERS + setopt SH_WORD_SPLIT + ' >> "\$tmp/script" + sed -e 's/\''${!\([^}]*\)}/\''${(P)\1}/g' \ + -e 's/[[]\*\]//' \ + -e 's/substitute() {/ substitute() { return; /' \ + -e 's@PATH=\$@PATH=${pkgs.coreutils}/bin@' \ + "$s" >> "\$tmp/script" + echo "\$tmp/script"; + source "\$tmp/script"; + fi rm -fr "\$tmp" ${extraCmds} export PATH From 5778dd836dec328d32c6807cf417e06194bb44c8 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Wed, 11 Feb 2009 16:12:14 +0000 Subject: [PATCH 47/59] mend svn path=/nixpkgs/trunk/; revision=14035 --- pkgs/misc/my-env/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index 4d06a8b5c8e3..d876991ce6ac 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -73,7 +73,7 @@ mkDerivation { source "$s" else setopt interactivecomments - # fix bash indirection + # fix bash indirection # let's hope the bash arrays aren't used # substitute is using bash array, so skip it echo ' From 7590daad4255c5f650b93f1b2d329f2de3ba46c3 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 11 Feb 2009 21:51:05 +0000 Subject: [PATCH 48/59] Extra mirror for lsof svn path=/nixpkgs/trunk/; revision=14036 --- pkgs/development/tools/misc/lsof/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 9468b707f372..8d793d5004e1 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -5,6 +5,7 @@ stdenv.mkDerivation { src = fetchurl { urls = [ + http://ftp.uni-bayreuth.de/packages/tools/lsof/lsof_4.81.tar.bz2 ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.81.tar.bz2 ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/lsof_4.81.tar.bz2 ]; From 09bb1e1116346bcbb746f6256dad55eceb2b7790 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 12 Feb 2009 14:52:23 +0000 Subject: [PATCH 49/59] Updated log4cxx to version 0.10.0 by using a patch from Andrew Morsillo svn path=/nixpkgs/trunk/; revision=14039 --- pkgs/development/libraries/log4cxx/default.nix | 16 ++++++++-------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/log4cxx/default.nix b/pkgs/development/libraries/log4cxx/default.nix index 63f32c05bc77..c7a66b22c51e 100644 --- a/pkgs/development/libraries/log4cxx/default.nix +++ b/pkgs/development/libraries/log4cxx/default.nix @@ -1,11 +1,11 @@ -args: with args; +{stdenv, fetchurl, autoconf, automake, libtool, libxml2, cppunit, boost, + apr, aprutil, db45, expat}: stdenv.mkDerivation { - name = "log4cxx-0.9.7"; - src = fetchurl { - url = http://archive.apache.org/dist/logging/log4cxx/log4cxx-0.9.7.tar.gz; - sha256 = "1ikyxd8jgf7b2cqjk5lidl7cffs114iiblaczaqbv5bm4vyb4hav"; - }; - buildInputs = [ autoconf automake libtool libxml2 cppunit boost ]; - patchPhase = "sh autogen.sh; sed -e 's/DOMConfigurator::subst/subst/' -i include/log4cxx/xml/domconfigurator.h"; + name = "log4cxx-0.10.0"; + src = fetchurl { + url = http://apache.mirrors.hoobly.com/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz; + sha256 = "130cjafck1jlqv92mxbn47yhxd2ccwwnprk605c6lmm941i3kq0d"; + }; + buildInputs = [ autoconf automake libtool libxml2 cppunit boost apr aprutil db45 expat]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc86a16b029c..8a88f54e483d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3484,6 +3484,7 @@ let log4cxx = import ../development/libraries/log4cxx { inherit fetchurl stdenv automake autoconf libtool cppunit libxml2 boost; + inherit apr aprutil db45 expat; }; loudmouth = import ../development/libraries/loudmouth { From 61e7bd73728248a9c14ef75837e749a78bb1092e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 12 Feb 2009 15:56:35 +0000 Subject: [PATCH 50/59] * Perl builder: run tests by default. svn path=/nixpkgs/trunk/; revision=14041 --- .../perl-modules/generic/builder.sh | 6 +----- .../perl-modules/generic/default.nix | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 12407f6e09b9..6ac5dc5f91b6 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -2,14 +2,10 @@ source $stdenv/setup PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/site_perl" -oldIFS=$IFS -IFS=: perlFlags= -for i in $PERL5LIB; do +for i in $(IFS=:; echo $PERL5LIB); do perlFlags="$perlFlags -I$i" done -IFS=$oldIFS -echo "Perl flags: $perlFlags" oldPreConfigure="$preConfigure" preConfigure=preConfigure diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 2909664bf879..77d881b2eb0e 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -2,8 +2,17 @@ perl: attrs: -perl.stdenv.mkDerivation (attrs // { - name = "perl-" + attrs.name; - builder = ./builder.sh; - buildInputs = [(if attrs ? buildInputs then attrs.buildInputs else []) perl]; -}) +perl.stdenv.mkDerivation ( + { + doCheck = true; + checkTarget = "test"; + } + // + attrs + // + { + name = "perl-" + attrs.name; + builder = ./builder.sh; + buildInputs = [(if attrs ? buildInputs then attrs.buildInputs else []) perl]; + } +) From 29e33f4a120f269b1f7f9297a582ea8cf8b5b6f5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 12 Feb 2009 15:59:22 +0000 Subject: [PATCH 51/59] * Latest Catalyst packages, include FormFu and its gazillion dependencies. svn path=/nixpkgs/trunk/; revision=14042 --- pkgs/top-level/all-packages.nix | 642 ++++++++++++++++++++++++++------ 1 file changed, 533 insertions(+), 109 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a88f54e483d..d6f226411bbb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4163,6 +4163,14 @@ let propagatedBuildInputs = [perlCarpClan]; }; + perlBoolean = buildPerlPackage rec { + name = "boolean-0.20"; + src = fetchurl { + url = "mirror://cpan/authors/id/I/IN/INGY/${name}.tar.gz"; + sha256 = "1xqhzy3m2r08my13alff9bzl8b6xgd68312834x0hf33yir3l1yn"; + }; + }; + perlCacheFastMmap = buildPerlPackage { name = "Cache-FastMmap-1.28"; src = fetchurl { @@ -4171,6 +4179,33 @@ let }; }; + perlCaptchaReCAPTCHA = buildPerlPackage rec { + name = "Captcha-reCAPTCHA-0.92"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AN/ANDYA/${name}.tar.gz"; + sha256 = "1fm0fvdy9b7z8k1cyah2qbj0gqlv01chxmqmashwj16198yr7vrc"; + }; + propagatedBuildInputs = [perlHTMLTiny perlLWP]; + buildInputs = [perlTestPod]; + }; + + perlCarpAssert = buildPerlPackage rec { + name = "Carp-Assert-0.20"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MS/MSCHWERN/${name}.tar.gz"; + sha256 = "1wzy4lswvwi45ybsm65zlq17rrqx84lsd7rajvd0jvd5af5lmlqd"; + }; + }; + + perlCarpAssertMore = buildPerlPackage rec { + name = "Carp-Assert-More-1.12"; + src = fetchurl { + url = "mirror://cpan/authors/id/P/PE/PETDANCE/${name}.tar.gz"; + sha256 = "1m9k6z0m10s03x2hnc9mh5d4r8lnczm9bqd54jmnw0wzm4m33lyr"; + }; + propagatedBuildInputs = [perlTestException perlCarpAssert]; + }; + perlCarpClan = buildPerlPackage { name = "Carp-Clan-6.00"; src = fetchurl { @@ -4189,11 +4224,35 @@ let propagatedBuildInputs = [perlCatalystRuntime perlHTTPRequestAsCGI perlDataVisitor]; }; - perlCatalystDevel = buildPerlPackage { - name = "Catalyst-Devel-1.08"; + perlCatalystComponentInstancePerContext = buildPerlPackage rec { + name = "Catalyst-Component-InstancePerContext-0.001001"; src = fetchurl { - url = mirror://cpan/authors/id/M/MR/MRAMBERG/Catalyst-Devel-1.08.tar.gz; - sha256 = "1wc2ysmldxd5bczfy6ijd8pbaq18g3snrg0cjc8k48941k8dcqpc"; + url = "mirror://cpan/authors/id/G/GR/GRODITI/${name}.tar.gz"; + sha256 = "0wfj4vnn2cvk6jh62amwlg050p37fcwdgrn9amcz24z6w4qgjqvz"; + }; + propagatedBuildInputs = [perlCatalystRuntime perlMoose]; + }; + + perlCatalystControllerHTMLFormFu = buildPerlPackage rec { + name = "Catalyst-Controller-HTML-FormFu-0.03007"; + src = fetchurl { + url = "mirror://cpan/authors/id/C/CF/CFRANKS/${name}.tar.gz"; + sha256 = "1vrd79d0nbqkana5q483fgsr41idlfgjhf7fpd3hc056z5nq8iyn"; + }; + propagatedBuildInputs = [ + perlCatalystRuntime perlCatalystActionRenderView perlCatalystViewTT + perlCatalystPluginConfigLoader perlConfigGeneral + perlCatalystComponentInstancePerContext perlMoose + perlRegexpAssemble perlTestWWWMechanize + perlTestWWWMechanizeCatalyst perlHTMLFormFu + ]; + }; + + perlCatalystDevel = buildPerlPackage rec { + name = "Catalyst-Devel-1.10"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MR/MRAMBERG/${name}.tar.gz"; + sha256 = "19ylkx55gaq9xxxcl4a55284in7hdrr2sb6lqz64daq3xp29n73h"; }; propagatedBuildInputs = [ perlCatalystRuntime perlCatalystActionRenderView @@ -4203,12 +4262,13 @@ let ]; }; - perlCatalystManual = buildPerlPackage { - name = "Catalyst-Manual-5.7013"; + perlCatalystManual = buildPerlPackage rec { + name = "Catalyst-Manual-5.7016"; src = fetchurl { - url = mirror://cpan/authors/id/Z/ZA/ZARQUON/Catalyst-Manual-5.7013.tar.gz; - sha256 = "17n9w7gd2mj8mkw8zv9as0ba3qzwn07js7xgd46avxpcscl2fpqx"; + url = "mirror://cpan/authors/id/H/HK/HKCLARK/${name}.tar.gz"; + sha256 = "0axin80dca3xb0n7frn9w8lj43l7dykpwrf7jj44n1v1kyzw813f"; }; + buildInputs = [perlTestPod perlTestPodCoverage]; }; perlCatalystModelDBICSchema = buildPerlPackage { @@ -4224,11 +4284,11 @@ let ]; }; - perlCatalystRuntime = buildPerlPackage { - name = "Catalyst-Runtime-5.7015"; + perlCatalystRuntime = buildPerlPackage rec{ + name = "Catalyst-Runtime-5.71000"; src = fetchurl { - url = mirror://cpan/authors/id/M/MR/MRAMBERG/Catalyst-Runtime-5.7015.tar.gz; - sha256 = "039c6ipn87lf23y7r7zg0bnga31nqzklrf28p6nd0xkhs1wihfbg"; + url = "mirror://cpan/authors/id/M/MR/MRAMBERG/${name}.tar.gz"; + sha256 = "0j9kwp2ylah0qsvgv08lnv49dlykx94bivwngw3zwn3g9qfbq26c"; }; propagatedBuildInputs = [ perlLWP perlClassAccessor perlClassDataInheritable perlClassInspector @@ -4237,11 +4297,11 @@ let ]; }; - perlCatalystPluginAuthentication = buildPerlPackage { - name = "Catalyst-Plugin-Authentication-0.10006"; + perlCatalystPluginAuthentication = buildPerlPackage rec { + name = "Catalyst-Plugin-Authentication-0.10010"; src = fetchurl { - url = mirror://cpan/authors/id/J/JA/JAYK/Catalyst-Plugin-Authentication-0.10006.tar.gz; - sha256 = "11x5d1l7p8z7q20fj79nlhwbmsab21m56rj5x20jkqfl91jx1l2s"; + url = "mirror://cpan/authors/id/B/BO/BOBTFISH/${name}.tar.gz"; + sha256 = "1jjdmyccsq0k8ysl9ppm7rddf6w4l2yhwjr60c0x4lp5iafzmf4z"; }; propagatedBuildInputs = [perlCatalystRuntime perlCatalystPluginSession]; }; @@ -4291,13 +4351,13 @@ let ]; }; - perlCatalystPluginConfigLoader = buildPerlPackage { - name = "Catalyst-Plugin-ConfigLoader-0.21"; + perlCatalystPluginConfigLoader = buildPerlPackage rec { + name = "Catalyst-Plugin-ConfigLoader-0.22"; src = fetchurl { - url = mirror://cpan/authors/id/B/BR/BRICAS/Catalyst-Plugin-ConfigLoader-0.21.tar.gz; - sha256 = "1wv7j69ddwr8vrc6v4ipymdnv8mr9ak5jwiq0fia85bx9cv9f77j"; + url = "mirror://cpan/authors/id/B/BR/BRICAS/${name}.tar.gz"; + sha256 = "13ir2l0pvjn4myp7wfh2bxcdd4hp0b3ln28mz1kvlshhxl032lqn"; }; - propagatedBuildInputs = [perlCatalystRuntime perlDataVisitor perlConfigAny]; + propagatedBuildInputs = [perlCatalystRuntime perlDataVisitor perlConfigAny perlMROCompat]; }; perlCatalystPluginHTMLWidget = buildPerlPackage { @@ -4309,31 +4369,34 @@ let propagatedBuildInputs = [perlCatalystRuntime perlHTMLWidget]; }; - perlCatalystPluginSession = buildPerlPackage { - name = "Catalyst-Plugin-Session-0.19"; + perlCatalystPluginSession = buildPerlPackage rec{ + name = "Catalyst-Plugin-Session-0.20"; src = fetchurl { - url = mirror://cpan/authors/id/N/NU/NUFFIN/Catalyst-Plugin-Session-0.19.tar.gz; - sha256 = "1gdirzm0fd167cm7ilqjhsw3g8ipfcklkrb0sj1grp9szhs5nlsd"; + url = "mirror://cpan/authors/id/B/BO/BOBTFISH/${name}.tar.gz"; + sha256 = "1p72hf68qi038gayhsxbbx3l3hg7b1njjii510alxqyw3a10y9sj"; }; - propagatedBuildInputs = [perlCatalystRuntime perlTestMockObject perlObjectSignature perlTestDeep]; + propagatedBuildInputs = [ + perlCatalystRuntime perlTestMockObject perlObjectSignature + perlTestDeep perlMROCompat + ]; }; - perlCatalystPluginSessionStateCookie = buildPerlPackage { - name = "Catalyst-Plugin-Session-State-Cookie-0.09"; + perlCatalystPluginSessionStateCookie = buildPerlPackage rec { + name = "Catalyst-Plugin-Session-State-Cookie-0.10"; src = fetchurl { - url = mirror://cpan/authors/id/N/NU/NUFFIN/Catalyst-Plugin-Session-State-Cookie-0.09.tar.gz; - sha256 = "03j2x66vq1ns4m5xlpwxmpnwhwqmg27m9qxm0kqg1a4v12ky9669"; + url = "mirror://cpan/authors/id/B/BO/BOBTFISH/${name}.tar.gz"; + sha256 = "1630shg23cpk6v26fwf7xr53ml1s6l2mgirxw524nmciliczgldj"; }; propagatedBuildInputs = [ perlCatalystRuntime perlCatalystPluginSession perlTestMockObject ]; }; - perlCatalystPluginSessionStoreFastMmap = buildPerlPackage { - name = "Catalyst-Plugin-Session-State-Cookie-0.09"; + perlCatalystPluginSessionStoreFastMmap = buildPerlPackage rec { + name = "Catalyst-Plugin-Session-Store-FastMmap-0.06"; src = fetchurl { - url = mirror://cpan/authors/id/K/KA/KARMAN/Catalyst-Plugin-Session-Store-FastMmap-0.05.tar.gz; - sha256 = "0k1x9fbixlb20bw5rym27ariss6rwbp06rd4znr979l7r571fy3p"; + url = "mirror://cpan/authors/id/K/KA/KARMAN/${name}.tar.gz"; + sha256 = "0by8w1zbp2802f9n3sqp0cmm2q0pwnycf0jgzvvv75riicq1m9pn"; }; propagatedBuildInputs = [ perlPathClass perlCatalystPluginSession perlCacheFastMmap @@ -4403,11 +4466,11 @@ let propagatedBuildInputs = [perlClassAccessor]; }; - perlClassAccessorGrouped = buildPerlPackage { - name = "Class-Accessor-Grouped-0.08001"; + perlClassAccessorGrouped = buildPerlPackage rec { + name = "Class-Accessor-Grouped-0.08002"; src = fetchurl { - url = mirror://cpan/authors/id/C/CL/CLACO/Class-Accessor-Grouped-0.08001.tar.gz; - sha256 = "15hwk5w4xxw5zr3yzp8ib93mja6xwsknasfb1jsa6a4k0r7xmq3f"; + url = "mirror://cpan/authors/id/C/CL/CLACO/${name}.tar.gz"; + sha256 = "0y7dqf0k5zh8azkb181k1zbbcy14rhfd55yddhccbfp6v44yl7yr"; }; propagatedBuildInputs = [perlClassInspector perlMROCompat]; }; @@ -4420,11 +4483,11 @@ let }; }; - perlClassC3 = buildPerlPackage { - name = "Class-C3-0.19"; + perlClassC3 = buildPerlPackage rec { + name = "Class-C3-0.20"; src = fetchurl { - url = mirror://cpan/authors/id/B/BL/BLBLACK/Class-C3-0.19.tar.gz; - sha256 = "1sn3s2ibdgwzirn3vl0s458qqncg76fxpqzcmyjmxy1kbdmjy01s"; + url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz"; + sha256 = "1xmd77ghxgn4yjd25z25df0isaz3k3b685q151x0f3537kl8cln3"; }; }; @@ -4453,6 +4516,14 @@ let }; }; + perlClassFactoryUtil = buildPerlPackage rec { + name = "Class-Factory-Util-1.7"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "09ifd6v0c94vr20n9yr1dxgcp7hyscqq851szdip7y24bd26nlbc"; + }; + }; + perlClassInspector = buildPerlPackage { name = "Class-Inspector-1.23"; src = fetchurl { @@ -4461,6 +4532,26 @@ let }; }; + perlClassMOP = buildPerlPackage rec { + name = "Class-MOP-0.76"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "0hya7hyz80d65vf1llanasg0gszgjyc52842xxzgqhy4vvnwviyy"; + }; + propagatedBuildInputs = [ + perlMROCompat perlTaskWeaken perlTestException perlSubName perlSubIdentify + perlDevelGlobalDestruction + ]; + }; + + perlClassSingleton = buildPerlPackage rec { + name = "Class-Singleton-1.4"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AB/ABW/${name}.tar.gz"; + sha256 = "0l4iwwk91wm2mrrh4irrn6ham9k12iah1ry33k0lzq22r3kwdbyg"; + }; + }; + perlClassThrowable = buildPerlPackage { name = "Class-Throwable-0.10"; src = fetchurl { @@ -4510,6 +4601,23 @@ let }; }; + perlCryptCBC = buildPerlPackage rec { + name = "Crypt-CBC-2.30"; + src = fetchurl { + url = "mirror://cpan/authors/id/L/LD/LDS/${name}.tar.gz"; + sha256 = "0cvigpxvwn18kb5i40jlp5fgijbhncvlh23xdgs1cnhxa17yrgwx"; + }; + }; + + perlCryptDES = buildPerlPackage rec { + name = "Crypt-DES-2.05"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DP/DPARIS/${name}.tar.gz"; + sha256 = "1w12k1b7868v3ql0yprswlz2qri6ja576k9wlda7b8zf2d0rxgmp"; + }; + buildInputs = [perlCryptCBC]; + }; + perlCryptPasswordMD5 = buildPerlPackage { name = "Crypt-PasswdMD5-1.3"; src = fetchurl { @@ -4535,6 +4643,15 @@ let propagatedBuildInputs = [perlTestException]; }; + perlDataOptList = buildPerlPackage rec { + name = "Data-OptList-0.104"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RJ/RJBS/${name}.tar.gz"; + sha256 = "1k1qvf3ik2rn9mg65ginv3lyy6dlg1z08yddcnzbnizs8vbqqaxd"; + }; + propagatedBuildInputs = [perlSubInstall perlParamsUtil]; + }; + perlDataPage = buildPerlPackage { name = "Data-Page-2.01"; src = fetchurl { @@ -4573,6 +4690,69 @@ let }; }; + perlDateTime = buildPerlPackage rec { + name = "DateTime-0.4501"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "1hqhc4xfjgcc1r488gjbi498ws3pxiayabl46607lq02qddcv57s"; + }; + propagatedBuildInputs = [perlDateTimeLocale perlDateTimeTimeZone]; + }; + + perlDateTimeFormatBuilder = buildPerlPackage rec { + name = "DateTime-Format-Builder-0.7901"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "08zl89gh5lkff8736fkdnrf6dgppsjbmymnysbc06s7igd4ig8zf"; + }; + propagatedBuildInputs = [ + perlDateTime perlParamsValidate perlTaskWeaken perlDateTimeFormatStrptime + perlClassFactoryUtil + ]; + buildInputs = [perlTestPod]; + }; + + perlDateTimeFormatNatural = buildPerlPackage rec { + name = "DateTime-Format-Natural-0.74"; + src = fetchurl { + url = "mirror://cpan/authors/id/S/SC/SCHUBIGER/${name}.tar.gz"; + sha256 = "0hq33s5frfa8cpj2al7qi0sbmimm5sdlxf0h3b57fjm9x5arlkcn"; + }; + propagatedBuildInputs = [ + perlDateTime perlListMoreUtils perlParamsValidate perlDateCalc + perlTestMockTime perlBoolean + ]; + }; + + perlDateTimeFormatStrptime = buildPerlPackage rec { + name = "DateTime-Format-Strptime-1.0800"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RI/RICKM/${name}.tgz"; + sha256 = "10vsmwlhnc62krsh5fm2i0ya7bgjgjsm6nmj56f0bfifjh57ya1j"; + }; + propagatedBuildInputs = [ + perlDateTime perlDateTimeLocale perlDateTimeTimeZone perlParamsValidate + ]; + }; + + perlDateTimeLocale = buildPerlPackage rec { + name = "DateTime-Locale-0.42"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "1cvp9a4j6vy3xpbv6ipzcz1paw7gzal7lkrbm5ipiilji47d5gaw"; + }; + propagatedBuildInputs = [perlListMoreUtils perlParamsValidate]; + }; + + perlDateTimeTimeZone = buildPerlPackage rec { + name = "DateTime-TimeZone-0.84"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "0jwbldr3x1cl2ibd9dcshdmpg6s5ddc4qiaxcxyqc82cq09ah2vs"; + }; + propagatedBuildInputs = [perlClassSingleton perlParamsValidate]; + }; + perlDBDSQLite = import ../development/perl-modules/DBD-SQLite { inherit fetchurl buildPerlPackage perlDBI sqlite; }; @@ -4589,11 +4769,11 @@ let }; }; - perlDBIxClass = buildPerlPackage { - name = "DBIx-Class-0.08099_05"; + perlDBIxClass = buildPerlPackage rec { + name = "DBIx-Class-0.08011"; src = fetchurl { - url = mirror://cpan/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.08099_05.tar.gz; - sha256 = "143sp6walr9gmnk0caxidhnzciixawihkiwm7vf9clbdhhrn39zj"; + url = "mirror://cpan/authors/id/R/RI/RIBASUSHI/${name}.tar.gz"; + sha256 = "0bdp2hqbxdn0xzjja0wcynwvq36z2vwz7yx5w34s82g59pmf5dbx"; }; propagatedBuildInputs = [ perlTestNoWarnings perlTestException perlDBI perlScopeGuard @@ -4602,22 +4782,24 @@ let perlSQLAbstractLimit perlClassC3 perlClassC3Componentised perlModuleFind perlDBDSQLite perlJSONAny perlSubName ]; + buildInputs = [perlTestPod perlTestPodCoverage]; + doCheck = false; /* it says "8 subtests UNEXPECTEDLY SUCCEEDED" */ }; - perlDBIxClassHTMLWidget = buildPerlPackage { - name = "DBIx-Class-HTMLWidget"; + perlDBIxClassHTMLWidget = buildPerlPackage rec { + name = "DBIx-Class-HTMLWidget-0.16"; src = fetchurl { - url = http://search.cpan.org/CPAN/authors/id/A/AN/ANDREMAR/DBIx-Class-HTMLWidget-0.16.tar.gz; + url = "mirror://cpan/authors/id/A/AN/ANDREMAR/${name}.tar.gz"; sha256 = "05zhniyzl31nq410ywhxm0vmvac53h7ax42hjs9mmpvf45ipahj1"; }; propagatedBuildInputs = [perlDBIxClass perlHTMLWidget]; }; - perlDBIxClassSchemaLoader = buildPerlPackage { + perlDBIxClassSchemaLoader = buildPerlPackage rec { name = "DBIx-Class-Schema-Loader-0.04005"; src = fetchurl { - url = mirror://cpan/authors/id/I/IL/ILMARI/DBIx-Class-Schema-Loader-0.04999_06.tar.gz; - sha256 = "169ydwjarq6qk48jdxcn5ks8rx9aksk9fnx07gl5mz7banw5cs6y"; + url = "mirror://cpan/authors/id/I/IL/ILMARI/${name}.tar.gz"; + sha256 = "1adymxsh1q7y1d3x25mar1rz6nshag16h6bfzhwy0w50qd2vvx9l"; }; propagatedBuildInputs = [ perlDBI perlDBDSQLite perlDataDump perlUNIVERSALrequire @@ -4627,12 +4809,32 @@ let ]; }; - perlDevelStackTrace = buildPerlPackage { - name = "Devel-StackTrace-1.1902"; + perlDevelGlobalDestruction = buildPerlPackage rec { + name = "Devel-GlobalDestruction-0.02"; src = fetchurl { - url = mirror://cpan/authors/id/D/DR/DROLSKY/Devel-StackTrace-1.1902.tar.gz; - sha256 = "0llkvmpdcbqhw28ck0gzw4jlc2zbz7sx3dqscysdc05nk2fd3iax"; + url = "mirror://cpan/authors/id/N/NU/NUFFIN/${name}.tar.gz"; + sha256 = "174m5dx2z89h4308gx6s6vmg93qzaq0bh9m91hp2vqbyialnarhw"; }; + propagatedBuildInputs = [perlSubExporter perlScopeGuard]; + }; + + perlDevelStackTrace = buildPerlPackage rec { + name = "Devel-StackTrace-1.20"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "15zh9gzhw6gv7l6sklp02pfmiiv8kwmmjsyvirppsca6aagy4603"; + }; + }; + + perlDevelSymdump = buildPerlPackage rec { + name = "Devel-Symdump-2.08"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AN/ANDK/${name}.tar.gz"; + sha256 = "0qzj68zw1yypk8jw77h0w5sdpdcrp4xcmgfghcfyddjr2aim60x5"; + }; + propagatedBuildInputs = [ + perlTestPod /* cyclic dependency: perlTestPodCoverage */ + ]; }; perlDigestHMAC = buildPerlPackage { @@ -4684,6 +4886,7 @@ let sha256 = "13yfjll63cp1y4xqzdcr1mjhfncn48v6hckk5mvwi47w3ccj934a"; }; propagatedBuildInputs = [perlMailTools perlNetDNS]; + doCheck = false; }; perlEncode = buildPerlPackage { @@ -4692,7 +4895,6 @@ let url = mirror://cpan/authors/id/D/DA/DANKOGAI/Encode-2.25.tar.gz; sha256 = "0prwmbg3xh1lqskianwrfrgasdfmz4kjm3qpdm27ay110jkk25ak"; }; - propagatedBuildInputs = []; }; perlExtUtilsInstall = buildPerlPackage { @@ -4710,7 +4912,6 @@ let url = mirror://cpan/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.44.tar.gz; sha256 = "0zyypnlmmyp06qbfdpc14rp5rj63066mjammn6rlcqz2iil9mpcj"; }; - propagatedBuildInputs = []; }; perlExtUtilsManifest = buildPerlPackage { @@ -4719,7 +4920,6 @@ let url = mirror://cpan/authors/id/R/RK/RKOBES/ExtUtils-Manifest-1.53.tar.gz; sha256 = "0xgfzivw0dfy29ydfjkg0c9mvlhjvlhc54s0yvbb4sxb2mdvrfkp"; }; - propagatedBuildInputs = []; }; perlFilechdir = buildPerlPackage { @@ -4728,7 +4928,6 @@ let url = mirror://cpan/authors/id/D/DA/DAGOLDEN/File-chdir-0.1002.tar.gz; sha256 = "1fc2l754bxsizli3injm4wqf8dn03iq16rmfn62l99nxpibl5k6p"; }; - propagatedBuildInputs = []; }; perlFileCopyRecursive = buildPerlPackage { @@ -4747,13 +4946,21 @@ let }; }; + perlFileShareDir = buildPerlPackage rec { + name = "File-ShareDir-1.00"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AD/ADAMK/${name}.tar.gz"; + sha256 = "1afr1r1ys2ij8i4r0i85hfrgrbvcha8c7cgkhcrdya1f0lnpw59z"; + }; + propagatedBuildInputs = [perlClassInspector perlParamsUtil]; + }; + perlFileTemp = buildPerlPackage { name = "File-Temp-0.20"; src = fetchurl { url = mirror://cpan/authors/id/T/TJ/TJENNESS/File-Temp-0.20.tar.gz; sha256 = "0n7lr7mpdvwgznw469qdpdmac627a26wp615dkpzanc452skad4v"; }; - propagatedBuildInputs = []; }; perlFreezeThaw = buildPerlPackage { @@ -4762,7 +4969,24 @@ let url = mirror://cpan/authors/id/I/IL/ILYAZ/modules/FreezeThaw-0.43.tar.gz; sha256 = "1qamc5aggp35xk590a4hy660f2rhc2l7j65hbyxdya9yvg7z437l"; }; - propagatedBuildInputs = []; + }; + + perlHTMLFormFu = buildPerlPackage rec { + name = "HTML-FormFu-0.03007"; + src = fetchurl { + url = "mirror://cpan/authors/id/C/CF/CFRANKS/${name}.tar.gz"; + sha256 = "03lc4pvygp4wn9rsgdkbwk8zkh8x2z5vp8613c6q74imwrfmmfqy"; + }; + propagatedBuildInputs = [ + perlClassAccessorChained perlClassC3 perlConfigAny + perlDateCalc perlListMoreUtils perlLWP perlEmailValid + perlDataVisitor perlDateTime perlDateTimeFormatBuilder + perlDateTimeFormatStrptime perlDateTimeFormatNatural + perlReadonly perlYAMLSyck perlRegexpCopy + perlHTMLTokeParserSimple perlTestNoWarnings perlRegexpCommon + perlCaptchaReCAPTCHA perlHTMLScrubber perlFileShareDir + perlTemplateToolkit perlCryptCBC perlCryptDES + ]; }; perlHTMLParser = buildPerlPackage { @@ -4791,6 +5015,24 @@ let }; }; + perlHTMLTiny = buildPerlPackage rec { + name = "HTML-Tiny-1.03"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AN/ANDYA/${name}.tar.gz"; + sha256 = "1nc9vr0z699jwv8jaxxpkfhspiv7glhdp500hqyzdm2jxfw8azrg"; + }; + }; + + perlHTMLTokeParserSimple = buildPerlPackage rec { + name = "HTML-TokeParser-Simple-3.15"; + src = fetchurl { + url = "mirror://cpan/authors/id/O/OV/OVID/${name}.tar.gz"; + sha256 = "0ii1ww17h7wps1lcj7bxrjbisa37f6cvlm0xxpgfq1s6iy06q05b"; + }; + propagatedBuildInputs = [perlHTMLParser perlSubOverride]; + buildInputs = [perlTestPod]; + }; + perlHTMLTree = buildPerlPackage { name = "HTML-Tree-3.23"; src = fetchurl { @@ -4813,12 +5055,13 @@ let ]; }; - perlHTTPBody = buildPerlPackage { - name = "HTTP-Body-1.04"; + perlHTTPBody = buildPerlPackage rec { + name = "HTTP-Body-1.05"; src = fetchurl { - url = mirror://cpan/authors/id/A/AG/AGRUNDMA/HTTP-Body-1.04.tar.gz; - sha256 = "11qxfv2p2bzd5xnl0ypy8l3frssszwrxafipm1fm36sxay2v71js"; + url = "mirror://cpan/authors/id/A/AG/AGRUNDMA/${name}.tar.gz"; + sha256 = "0s0496sb9l8jfkdx86vahwgdaaxrqb0j6acyww6nk0ajh82qrzfv"; }; + propagatedBuildInputs = [perlLWP perlYAML]; }; perlHTTPRequestAsCGI = buildPerlPackage { @@ -4830,13 +5073,31 @@ let propagatedBuildInputs = [perlClassAccessor perlLWP]; }; + perlHTTPResponseEncoding = buildPerlPackage rec { + name = "HTTP-Response-Encoding-0.05"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DA/DANKOGAI/${name}.tar.gz"; + sha256 = "04gdl633g0s2ckn7zixcma2krbpfcd46jngg155qpdx5sdwfkm16"; + }; + propagatedBuildInputs = [perlLWP]; + }; + + perlHTTPServerSimple = buildPerlPackage rec { + name = "HTTP-Server-Simple-0.38"; + src = fetchurl { + url = "mirror://cpan/authors/id/J/JE/JESSE/${name}.tar.gz"; + sha256 = "1m1lmpbg0zhiv2vyc3fyyqfsv3jhhb2mbdl5624fqb0va2pnla6n"; + }; + propagatedBuildInputs = [perlURI]; + doCheck = false; + }; + perlI18NLangTags = buildPerlPackage { name = "I18N-LangTags-0.35"; src = fetchurl { url = mirror://cpan/authors/id/S/SB/SBURKE/I18N-LangTags-0.35.tar.gz; sha256 = "0idwfi7k8l44d9akpdj6ygdz3q8zxr690m18s7w23ms9d55bh3jy"; }; - propagatedBuildInputs = []; }; perlIODigest = buildPerlPackage { @@ -4856,12 +5117,13 @@ let }; }; - perlIPCRun = buildPerlPackage { - name = "IPC-Run-0.80"; + perlIPCRun = buildPerlPackage rec { + name = "IPC-Run-0.82"; src = fetchurl { - url = mirror://cpan/authors/id/R/RS/RSOD/IPC-Run-0.80.tar.gz; - sha256 = "1lb0skp093ikkjg125l2f8lw7jzawmy4x7h1azgcs0d5miy8apj4"; + url = "mirror://cpan/authors/id/A/AD/ADAMK/${name}.tar.gz"; + sha256 = "1v5yfavvhxscqkdl68xs7i7vcp9drl3y1iawppzwqcl1fprd58ip"; }; + doCheck = false; /* attempts a network connection to localhost */ }; perlJSON = buildPerlPackage { @@ -4947,14 +5209,13 @@ let url = mirror://cpan/authors/id/A/AU/AUDREYT/Locale-Maketext-Simple-0.18.tar.gz; sha256 = "14kx7vkxyfqndy90rzavrjp2346aidyc7x5dzzdj293qf8s4q6ig"; }; - propagatedBuildInputs = []; }; - perlLWP = buildPerlPackage { - name = "libwww-perl-5.819"; + perlLWP = buildPerlPackage rec { + name = "libwww-perl-5.823"; src = fetchurl { - url = mirror://cpan/authors/id/G/GA/GAAS/libwww-perl-5.819.tar.gz; - sha256 = "6bc03e9e88213add8436fed020509a7126c6b79c330c3c115cb696fa3b5373ae"; + url = "mirror://cpan/authors/id/G/GA/GAAS/${name}.tar.gz"; + sha256 = "1pz65p02dcy1yf4l1zhhwjmnh6fvf8q71nsmhjpc5lydsf35h1ql"; }; propagatedBuildInputs = [perlURI perlHTMLParser perlHTMLTagset]; }; @@ -4994,6 +5255,18 @@ let }; }; + perlMoose = buildPerlPackage rec { + name = "Moose-0.68"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "0ncpa8v0yv7lkn108943sjll3gps5nkzn6a51ngvqq1rnsd34ar1"; + }; + propagatedBuildInputs = [ + perlTestMore perlTestException perlTaskWeaken perlListMoreUtils + perlClassMOP perlSubExporter + ]; + }; + perlMouse = buildPerlPackage { name = "Mouse-0.09"; src = fetchurl { @@ -5026,6 +5299,7 @@ let sha256 = "1pswrwhkav051xahm3k4cbyhi8kqpfmaz85lw44kwi2wc7mz4prk"; }; propagatedBuildInputs = [perlNetIP perlDigestHMAC]; + doCheck = false; }; perlNetIP = buildPerlPackage { @@ -5044,6 +5318,22 @@ let }; }; + perlParamsUtil = buildPerlPackage rec { + name = "Params-Util-0.37"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AD/ADAMK/${name}.tar.gz"; + sha256 = "1n36vhahbs2mfck5x6g8ab9280zji9zwc5092jiq78s791227cb6"; + }; + }; + + perlParamsValidate = buildPerlPackage rec { + name = "Params-Validate-0.91"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DR/DROLSKY/${name}.tar.gz"; + sha256 = "1j0hx3pbfdyggbhrawa9k0wdm6lln3zdkrhjrdg1hzzf6csrlc1v"; + }; + }; + perlParent = buildPerlPackage { name = "parent-0.221"; src = fetchurl { @@ -5066,7 +5356,6 @@ let url = mirror://cpan/authors/id/A/AU/AUDREYT/PerlIO-eol-0.14.tar.gz; sha256 = "1rwj0r075jfvvd0fnzgdqldc7qdb94wwsi21rs2l6yhcv0380fs2"; }; - propagatedBuildInputs = []; }; perlPerlIOviadynamic = buildPerlPackage { @@ -5075,7 +5364,6 @@ let url = mirror://cpan/authors/id/C/CL/CLKAO/PerlIO-via-dynamic-0.12.tar.gz; sha256 = "140hay9q8q9sz1fa2s57ijp5l2448fkcg7indgn6k4vc7yshmqz2"; }; - propagatedBuildInputs = []; }; perlPerlIOviasymlink = buildPerlPackage { @@ -5084,7 +5372,6 @@ let url = mirror://cpan/authors/id/C/CL/CLKAO/PerlIO-via-symlink-0.05.tar.gz; sha256 = "0lidddcaz9anddqrpqk4zwm550igv6amdhj86i2jjdka9b1x81s1"; }; - propagatedBuildInputs = []; }; perlModulePluggable = buildPerlPackage { @@ -5108,6 +5395,15 @@ let propagatedBuildInputs = [perlUNIVERSALrequire]; }; + perlPodCoverage = buildPerlPackage rec { + name = "Pod-Coverage-0.19"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RC/RCLAMP/${name}.tar.gz"; + sha256 = "1krsz4zwmnmq3z29p5vmyr5fdzrn8v0sg6rf3qxk7xpxw4z5np84"; + }; + propagatedBuildInputs = [perlDevelSymdump]; + }; + perlPodEscapes = buildPerlPackage { name = "Pod-Escapes-1.04"; src = fetchurl { @@ -5125,6 +5421,38 @@ let propagatedBuildInputs = [perlconstant perlPodEscapes]; }; + perlReadonly = buildPerlPackage rec { + name = "Readonly-1.03"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RO/ROODE/${name}.tar.gz"; + sha256 = "1shkyxajh6l87nif47ygnfxjwvqf3d3kjpdvxaff4957vqanii2k"; + }; + }; + + perlRegexpAssemble = buildPerlPackage rec { + name = "Regexp-Assemble-0.34"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DL/DLAND/${name}.tar.gz"; + sha256 = "173dnzi3dag88afr4xf5v0hki15cfaffyjimjfmvzv6gbx6fp96f"; + }; + }; + + perlRegexpCommon = buildPerlPackage rec { + name = "Regexp-Common-2.122"; + src = fetchurl { + url = "mirror://cpan/authors/id/A/AB/ABIGAIL/${name}.tar.gz"; + sha256 = "1mi411nfsx58nfsgjsbyck50x9d0yfvwqpw63iavajlpx1z38n8r"; + }; + }; + + perlRegexpCopy = buildPerlPackage rec { + name = "Regexp-Copy-0.06"; + src = fetchurl { + url = "mirror://cpan/authors/id/J/JD/JDUNCAN/${name}.tar.gz"; + sha256 = "09c8xb43p1s6ala6g4274az51mf33phyjkp66dpvgkgbi1xfnawp"; + }; + }; + perlReturnValue = buildPerlPackage { name = "Return-Value-1.302"; src = fetchurl { @@ -5157,13 +5485,16 @@ let }; }; - perlSQLAbstractLimit = buildPerlPackage { - name = "SQL-Abstract-Limit-0.12"; + perlSQLAbstractLimit = buildPerlPackage rec { + name = "SQL-Abstract-Limit-0.141"; src = fetchurl { - url = mirror://cpan/authors/id/D/DA/DAVEBAIRD/SQL-Abstract-Limit-0.12.tar.gz; - sha256 = "1b8663l7myc54k40xmyq003v6xs1y6bhdm1jpahrv44wzcl60n7z"; + url = "mirror://cpan/authors/id/D/DA/DAVEBAIRD/${name}.tar.gz"; + sha256 = "1qqh89kz065mkgyg5pjcgbf8qcpzfk8vf1lgkbwynknadmv87zqg"; }; - propagatedBuildInputs = [perlSQLAbstract perlTestException perlDBI]; + propagatedBuildInputs = [ + perlSQLAbstract perlTestException perlDBI perlTestDeep + ]; + buildInputs = [perlTestPod perlTestPodCoverage]; }; perlStringMkPasswd = buildPerlPackage { @@ -5174,6 +5505,31 @@ let }; }; + perlSubExporter = buildPerlPackage rec { + name = "Sub-Exporter-0.982"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RJ/RJBS/${name}.tar.gz"; + sha256 = "0xf8q05k5xs3bw6qy3pnnl5d670njxsxbw2dprl7n50hf488cbvj"; + }; + propagatedBuildInputs = [perlSubInstall perlDataOptList perlParamsUtil]; + }; + + perlSubIdentify = buildPerlPackage rec { + name = "Sub-Identify-0.04"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RG/RGARCIA/${name}.tar.gz"; + sha256 = "16g4dkmb4h5hh15jsq0kvsf3irrlrlqdv7qk6605wh5gjjwbcjxy"; + }; + }; + + perlSubInstall = buildPerlPackage rec { + name = "Sub-Install-0.925"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RJ/RJBS/${name}.tar.gz"; + sha256 = "1sccc4nwp9y24zkr42ww2gwg6zwax4madi9spsdym1pqna3nwnm6"; + }; + }; + perlSubName = buildPerlPackage { name = "Sub-Name-0.04"; src = fetchurl { @@ -5182,6 +5538,15 @@ let }; }; + perlSubOverride = buildPerlPackage rec { + name = "Sub-Override-0.08"; + src = fetchurl { + url = "mirror://cpan/authors/id/O/OV/OVID/${name}.tar.gz"; + sha256 = "13s5zi6qz02q50vv4bmwdmhn9gvg0988fydjlrrv500g6hnyzlkj"; + }; + propagatedBuildInputs = [perlSubUplevel perlTestException]; + }; + perlSubUplevel = buildPerlPackage { name = "Sub-Uplevel-0.2002"; src = fetchurl { @@ -5217,16 +5582,17 @@ let propagatedBuildInputs = [subversion]; }; - perlTaskCatalystTutorial = buildPerlPackage { - name = "Task-Catalyst-Tutorial-0.03"; + perlTaskCatalystTutorial = buildPerlPackage rec { + name = "Task-Catalyst-Tutorial-0.05"; src = fetchurl { - url = mirror://cpan/authors/id/J/JR/JROCKWAY/Task-Catalyst-Tutorial-0.03.tar.gz; - sha256 = "1f9nqg8h455s8dah482hf78i3h2bilji26i5m3lzr2cxws98lsak"; + url = "mirror://cpan/authors/id/M/MS/MSTROUT/${name}.tar.gz"; + sha256 = "0mqn64bspz1rq6m62yvy1gvmm0swz8xfhh8rg2p024v7g2qcyiy8"; }; propagatedBuildInputs = [ - perlCatalystRuntime perlCatalystManual perlCatalystDevel + perlCatalystManual perlCatalystRuntime perlCatalystDevel perlCatalystPluginSession perlCatalystPluginAuthentication perlCatalystPluginAuthenticationStoreDBIC + perlCatalystPluginAuthenticationStoreDBIxClass perlCatalystPluginAuthorizationRoles perlCatalystPluginAuthorizationACL perlCatalystPluginHTMLWidget @@ -5234,10 +5600,9 @@ let perlCatalystPluginStackTrace perlCatalystViewTT perlDBIxClass perlDBIxClassHTMLWidget + perlCatalystControllerHTMLFormFu ]; - preConfigure = '' - substituteInPlace Makefile.PL --replace "'Catalyst::Manual' => 0," "" - ''; + buildInputs = [perlTestPodCoverage]; }; perlTaskWeaken = buildPerlPackage { @@ -5305,6 +5670,14 @@ let }; }; + perlTestLongString = buildPerlPackage rec { + name = "Test-LongString-0.11"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RG/RGARCIA/${name}.tar.gz"; + sha256 = "0ln3117nfxzq7yxmfk77nnr7116inbjq4bf5v2p0hqlj4damx03d"; + }; + }; + perlTestMockObject = buildPerlPackage { name = "Test-MockObject-1.09"; src = fetchurl { @@ -5314,6 +5687,16 @@ let propagatedBuildInputs = [perlTestException perlUNIVERSALisa perlUNIVERSALcan]; }; + perlTestMockTime = buildPerlPackage rec { + name = "Test-MockTime-0.09"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DD/DDICK/${name}.tar.gz"; + sha256 = "1j2riyikzyfkxsgkfdqirs7xa8q5d06b9klpk7l9sgydwqdvxdv3"; + }; + }; + + perlTestMore = perlTestSimple; + perlTestNoWarnings = buildPerlPackage { name = "Test-NoWarnings-0.084"; src = fetchurl { @@ -5331,6 +5714,15 @@ let }; }; + perlTestPodCoverage = buildPerlPackage rec { + name = "Test-Pod-Coverage-1.08"; + src = fetchurl { + url = "mirror://cpan/authors/id/P/PE/PETDANCE/${name}.tar.gz"; + sha256 = "0y2md932zhbxdjwzskx0vmw2qy7jxkn87f9lb5h3f3vxxg1kcqz0"; + }; + propagatedBuildInputs = [perlPodCoverage]; + }; + perlTestSimple = buildPerlPackage { name = "Test-Simple-0.84"; src = fetchurl { @@ -5357,6 +5749,33 @@ let sha256 = "1y9g13bzvjsmg5v555zrl7w085jq40a47hfs4gc3k78s0bkwxbyi"; }; propagatedBuildInputs = [perlTestSimple perlTestException perlArrayCompare perlTreeDAGNode]; + buildInputs = [perlTestPod]; + }; + + perlTestWWWMechanize = buildPerlPackage rec { + name = "Test-WWW-Mechanize-1.24"; + src = fetchurl { + url = "mirror://cpan/authors/id/P/PE/PETDANCE/${name}.tar.gz"; + sha256 = "11knym5ppish78rk8r1hymvq1py43h7z8d6nk8p4ig3p246xx5qa"; + }; + propagatedBuildInputs = [ + perlCarpAssertMore perlURI perlTestLongString perlWWWMechanize + ]; + doCheck = false; + }; + + perlTestWWWMechanizeCatalyst = buildPerlPackage rec { + name = "Test-WWW-Mechanize-Catalyst-0.45"; + src = fetchurl { + url = "mirror://cpan/authors/id/L/LB/LBROCARD/${name}.tar.gz"; + sha256 = "0hixz0hibv2z87kdqvrphzgww0xibgg56w7bh299dgw2739hy4yf"; + }; + propagatedBuildInputs = [ + perlCatalystRuntime perlTestWWWMechanize perlWWWMechanize + perlCatalystPluginSessionStateCookie + ]; + buildInputs = [perlTestPod]; + doCheck = false; }; perlTextSimpleTable = buildPerlPackage { @@ -5390,7 +5809,6 @@ let url = mirror://cpan/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz; sha256 = "1cvcpaghn7dc14m9871sfw103g3m3a00m2mrl5iqb0mmh40yyhkr"; }; - propagatedBuildInputs = []; }; perlTimeHiRes = buildPerlPackage { @@ -5399,7 +5817,6 @@ let url = mirror://cpan/authors/id/J/JH/JHI/Time-HiRes-1.9715.tar.gz; sha256 = "0pgqrfkysy3mdcx5nd0x8c80lgqb7rkb3nrkii3vc576dcbpvw0i"; }; - propagatedBuildInputs = []; }; perlTreeDAGNode = buildPerlPackage { @@ -5461,14 +5878,24 @@ let }; }; - perlURI = buildPerlPackage { - name = "URI-1.35"; + perlURI = buildPerlPackage rec { + name = "URI-1.37"; src = fetchurl { - url = mirror://cpan/authors/id/G/GA/GAAS/URI-1.35.tar.gz; - md5 = "1a933b1114c41a25587ee59ba8376f7c"; + url = "mirror://cpan/authors/id/G/GA/GAAS/${name}.tar.gz"; + sha256 = "0amwbss2gz00fkdfnfixf1afmqal1246xhmj27g5c0ny7ahcid0j"; }; }; + perlWWWMechanize = buildPerlPackage rec { + name = "WWW-Mechanize-1.54"; + src = fetchurl { + url = "mirror://cpan/authors/id/P/PE/PETDANCE/${name}.tar.gz"; + sha256 = "1yxvw5xfng5fj4422869p5dwvmrkmqph9gdm2nl12wngydk93lnh"; + }; + propagatedBuildInputs = [perlLWP perlHTTPResponseEncoding perlHTTPServerSimple]; + doCheck = false; + }; + perlXMLDOM = buildPerlPackage { name = "XML-DOM-1.44"; src = fetchurl { @@ -5565,25 +5992,22 @@ let url = mirror://cpan/authors/id/S/SA/SAPER/XSLoader-0.08.tar.gz; sha256 = "0mr4l3givrpyvz1kg0kap2ds8g0rza2cim9kbnjy8hi64igkixi5"; }; - propagatedBuildInputs = []; }; - perlYAML = buildPerlPackage { - name = "YAML-0.66"; + perlYAML = buildPerlPackage rec { + name = "YAML-0.68"; src = fetchurl { - url = mirror://cpan/authors/id/I/IN/INGY/YAML-0.66.tar.gz; - sha256 = "1pcjf6y3l88ypa52mkk349jglabm53mhxda4p5awc1jl67lx3ngw"; + url = "mirror://cpan/authors/id/I/IN/INGY/${name}.tar.gz"; + sha256 = "0yg0pgsjkfczsblx03rxlw4ib92k0gwdyb1a258xb9wdg0w61h34"; }; - propagatedBuildInputs = []; }; - perlYAMLSyck = buildPerlPackage { - name = "YAML-Syck-1.04"; + perlYAMLSyck = buildPerlPackage rec { + name = "YAML-Syck-1.05"; src = fetchurl { - url = mirror://cpan/authors/id/A/AU/AUDREYT/YAML-Syck-1.04.tar.gz; - sha256 = "180w77rxqwrfmd2jjmrd407bf8vnpry73941g5n61ippzic5x1v3"; + url = "mirror://cpan/authors/id/A/AU/AUDREYT/${name}.tar.gz"; + sha256 = "15acwp2qdxfmhfqj4c1s57xyy48hcfc87lblww3lbvihqbysyzss"; }; - propagatedBuildInputs = []; }; From 120bb8afe3f813fc6acba0f34c1805601510ee92 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 12 Feb 2009 16:26:04 +0000 Subject: [PATCH 52/59] Added initial KDE 4.2 nix expression which build kdelibs svn path=/nixpkgs/trunk/; revision=14043 --- pkgs/top-level/all-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d6f226411bbb..e3e42de41a1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8981,6 +8981,14 @@ let openexr = openexr_1_6_1 ; }); + kde42 = import ../desktops/kde-4.2 { + inherit stdenv fetchurl cmake jdk; + inherit xlibs qt4 bzip2 libxml2 libxslt perl pcre exiv2 aspell; + inherit pthread_stubs gst_all xineLib fam log4cxx cluceneCore; + inherit redland avahi jasper shared_mime_info giflib; + openexr = openexr_1_6_1; + }; + kdebase = import ../desktops/kde/kdebase { inherit fetchurl stdenv pkgconfig x11 xlibs zlib libpng libjpeg perl From be986c5f9716dbb07b32b7e3b714d9969ffa1879 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 12 Feb 2009 16:26:32 +0000 Subject: [PATCH 53/59] Added initial KDE 4.2 nix expression which build kdelibs svn path=/nixpkgs/trunk/; revision=14044 --- pkgs/desktops/kde-4.2/default.nix | 36 +++++++++++++++++++ pkgs/desktops/kde-4.2/libs/default.nix | 15 ++++++++ .../kde-4.2/support/automoc4/default.nix | 11 ++++++ .../kde-4.2/support/phonon/default.nix | 17 +++++++++ .../kde-4.2/support/soprano/default.nix | 11 ++++++ .../kde-4.2/support/strigi/default.nix | 13 +++++++ 6 files changed, 103 insertions(+) create mode 100644 pkgs/desktops/kde-4.2/default.nix create mode 100644 pkgs/desktops/kde-4.2/libs/default.nix create mode 100644 pkgs/desktops/kde-4.2/support/automoc4/default.nix create mode 100644 pkgs/desktops/kde-4.2/support/phonon/default.nix create mode 100644 pkgs/desktops/kde-4.2/support/soprano/default.nix create mode 100644 pkgs/desktops/kde-4.2/support/strigi/default.nix diff --git a/pkgs/desktops/kde-4.2/default.nix b/pkgs/desktops/kde-4.2/default.nix new file mode 100644 index 000000000000..b90e51635596 --- /dev/null +++ b/pkgs/desktops/kde-4.2/default.nix @@ -0,0 +1,36 @@ +{stdenv, fetchurl, cmake, qt4, xlibs, bzip2, libxml2, libxslt, perl, exiv2, aspell, +pthread_stubs, gst_all, xineLib, fam, log4cxx, cluceneCore, redland, avahi, jdk, +pcre, jasper, openexr, shared_mime_info, giflib}: + +rec { +### SUPPORT + automoc4 = import ./support/automoc4 { + inherit stdenv fetchurl cmake; + inherit qt4; + }; + + phonon = import ./support/phonon { + inherit stdenv fetchurl cmake; + inherit qt4 pthread_stubs gst_all xineLib; + inherit (xlibs) libXau libXdmcp; + inherit automoc4; + }; + + strigi = import ./support/strigi { + inherit stdenv fetchurl cmake perl; + inherit bzip2 qt4 libxml2 exiv2 fam log4cxx cluceneCore; + }; + + soprano = import ./support/soprano { + inherit stdenv fetchurl cmake; + inherit qt4 jdk cluceneCore redland; + }; + +### LIBS + kdelibs = import ./libs { + inherit stdenv fetchurl cmake perl; + inherit qt4 bzip2 pcre fam libxml2 libxslt shared_mime_info giflib jasper; + inherit openexr aspell avahi; + inherit automoc4 phonon strigi soprano; + }; +} diff --git a/pkgs/desktops/kde-4.2/libs/default.nix b/pkgs/desktops/kde-4.2/libs/default.nix new file mode 100644 index 000000000000..66248f78d99f --- /dev/null +++ b/pkgs/desktops/kde-4.2/libs/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, cmake, perl, + qt4, bzip2, pcre, fam, libxml2, libxslt, shared_mime_info, giflib, jasper, + openexr, aspell, avahi, + automoc4, phonon, strigi, soprano}: + +stdenv.mkDerivation { + name = "kdelibs-4.2.0"; + src = fetchurl { + url = mirror://kde/stable/4.2.0/src/kdelibs-4.2.0.tar.bz2; + md5 = "2d830a922195fefe6e073111850247ac"; + }; + buildInputs = [ cmake perl qt4 stdenv.gcc.libc bzip2 pcre fam libxml2 libxslt + shared_mime_info giflib jasper openexr aspell avahi + automoc4 phonon strigi soprano ]; +} diff --git a/pkgs/desktops/kde-4.2/support/automoc4/default.nix b/pkgs/desktops/kde-4.2/support/automoc4/default.nix new file mode 100644 index 000000000000..8826396b1856 --- /dev/null +++ b/pkgs/desktops/kde-4.2/support/automoc4/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, cmake, +qt4}: + +stdenv.mkDerivation { + name = "automoc4-0.9.88"; + src = fetchurl { + url = mirror://kde/stable/automoc4/0.9.88/automoc4-0.9.88.tar.bz2; + md5 = "91bf517cb940109180ecd07bc90c69ec"; + }; + buildInputs = [ cmake qt4 ]; +} diff --git a/pkgs/desktops/kde-4.2/support/phonon/default.nix b/pkgs/desktops/kde-4.2/support/phonon/default.nix new file mode 100644 index 000000000000..99b3403f992e --- /dev/null +++ b/pkgs/desktops/kde-4.2/support/phonon/default.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, cmake, +libXau, libXdmcp, +qt4, pthread_stubs, +gst_all, xineLib, +automoc4}: + +stdenv.mkDerivation { + name = "phonon-4.3.0"; + src = fetchurl { + url = mirror://kde/stable/phonon/4.3.0/phonon-4.3.0.tar.bz2; + md5 = "f851219ec1fb4eadc7904f053b6b498d"; + }; + buildInputs = [ cmake + libXau libXdmcp + qt4 pthread_stubs gst_all.gstreamer gst_all.gstPluginsBase xineLib + automoc4 ]; +} diff --git a/pkgs/desktops/kde-4.2/support/soprano/default.nix b/pkgs/desktops/kde-4.2/support/soprano/default.nix new file mode 100644 index 000000000000..558c4fd66fb6 --- /dev/null +++ b/pkgs/desktops/kde-4.2/support/soprano/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, cmake, qt4, jdk, cluceneCore, redland}: + +stdenv.mkDerivation { + name = "soprano-2.2.1"; + src = fetchurl { + url = mirror://sourceforge/soprano/soprano-2.2.1.tar.bz2; + md5 = "69688a71273e1e9389fc60e3085c695f"; + }; + JAVA_HOME=jdk; + buildInputs = [ cmake qt4 jdk cluceneCore redland ]; +} diff --git a/pkgs/desktops/kde-4.2/support/strigi/default.nix b/pkgs/desktops/kde-4.2/support/strigi/default.nix new file mode 100644 index 000000000000..85d7099d8a44 --- /dev/null +++ b/pkgs/desktops/kde-4.2/support/strigi/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, cmake, perl, +bzip2, qt4, libxml2, exiv2, fam, log4cxx, cluceneCore}: + +stdenv.mkDerivation { + name = "strigi-0.6.4"; + src = fetchurl { + url = mirror://sourceforge/strigi/strigi-0.6.4.tar.bz2; + md5 = "324fd9606ac77765501717ff92c04f9a"; + }; + CLUCENE_HOME=cluceneCore; + buildInputs = [ cmake perl + bzip2 stdenv.gcc.libc qt4 libxml2 exiv2 fam log4cxx cluceneCore ]; +} From 0c3abad795ae96653757e9d41fbd3f1ef96c82cc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 12 Feb 2009 20:18:13 +0000 Subject: [PATCH 54/59] * Latest Compress::Zlib. * Put the fix for Perl modules that install in the wrong location ($out/lib instead of $out/lib/site_perl) in the generic Perl builder. svn path=/nixpkgs/trunk/; revision=14051 --- .../Compress-Raw-Zlib/default.nix | 20 +++++++++++ .../perl-modules/generic/builder.sh | 9 +++++ pkgs/top-level/all-packages.nix | 35 +++++++++++++++---- 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix diff --git a/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix new file mode 100644 index 000000000000..e83ae68b9544 --- /dev/null +++ b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix @@ -0,0 +1,20 @@ +{fetchurl, buildPerlPackage, zlib}: + +buildPerlPackage rec { + name = "Compress-Raw-Zlib-2.015"; + + src = fetchurl { + url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz"; + sha256 = "0g6kz73jxqjfln2pi500y7rr96mhad16hrp5wy6542fapamv4xcd"; + }; + + preConfigure = '' + cat > config.in < Date: Thu, 12 Feb 2009 20:27:54 +0000 Subject: [PATCH 55/59] fix perl, ruby, tcl support in vim_configurable svn path=/nixpkgs/trunk/; revision=14052 --- pkgs/applications/editors/vim/configurable.nix | 6 +++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index 0eac7ea5979f..abe1a403e762 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -23,10 +23,10 @@ composableDerivation { // edf { name = "xsmp"; } #Disable XSMP session management // edf { name = "xsmp_interact"; } #Disable XSMP interaction // edf { name = "mzscheme"; } #Include MzScheme interpreter. - // edf { name = "perl"; } #Include Perl interpreter. + // edf { name = "perl"; feat = "perlinterp"; enable = { buildInputs = [perl]; };} #Include Perl interpreter. // edf { name = "python"; feat = "pythoninterp"; enable = { buildInputs = [python]; }; } #Include Python interpreter. - // edf { name = "tcl"; } #Include Tcl interpreter. - // edf { name = "ruby"; } #Include Ruby interpreter. + // edf { name = "tcl"; enable = { buildInputs = [tcl]; }; } #Include Tcl interpreter. + // edf { name = "ruby"; feat = "rubyinterp"; enable = { buildInputs = [ruby]; };} #Include Ruby interpreter. // edf { name = "cscope"; } #Include cscope interface. // edf { name = "workshop"; } #Include Sun Visual Workshop support. // edf { name = "netbeans"; } #Disable NetBeans integration support. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ea2722311d4..5e982cd8a6bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8559,7 +8559,7 @@ let # optional features by passing # python # TODO mzschemeinterp perlinterp - inherit python /*x11*/; + inherit python perl tcl ruby /*x11*/; # optional features by flags flags = [ "X11" ]; # only flag "X11" by now From 387478ce5eaad71c8be8f387742c6a8557d3b29c Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 12 Feb 2009 20:27:56 +0000 Subject: [PATCH 56/59] vim_configurable: build with gtk, fix passing features=huge using gtk gvim does start much faster svn path=/nixpkgs/trunk/; revision=14053 --- pkgs/applications/editors/vim/configurable.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index abe1a403e762..b958eb6b8129 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -12,10 +12,10 @@ composableDerivation { sha256 = "11hxkb6r2550c4n13nwr0d8afvh30qjyr5c2hw16zgay43rb0kci"; }; - cfgOption = "--enable-gui=auto --with-features=${args.features}"; + configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"]; buildInputs = [ncurses pkgconfig] - ++ [ libX11 libXext libSM libXpm libXt libXaw libXau libXmu ]; + ++ [ gtk libX11 libXext libSM libXpm libXt libXaw libXau libXmu ]; # most interpreters aren't tested yet.. (see python for example how to do it) flags = {} From 498be42912a2fc31af19e15a602aa9acc4a0702f Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 12 Feb 2009 20:28:01 +0000 Subject: [PATCH 57/59] version bump: wireshark-1.1.2, libpcap-1.0.0 svn path=/nixpkgs/trunk/; revision=14054 --- .../networking/sniffers/wireshark/default.nix | 7 ++++--- pkgs/development/libraries/libpcap/default.nix | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 1dbb21bb8fce..25762db43ca4 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -1,10 +1,11 @@ {stdenv, fetchurl, perl, pkgconfig, gtk, libpcap, flex, bison}: stdenv.mkDerivation { - name = "wireshark-1.0.3"; + name = "wireshark-1.1.2"; src = fetchurl { - url = http://www.wireshark.org/download/src/wireshark-1.0.3.tar.bz2; - sha256 = "1wmkbq0rgy7rz8mqggyay98z4qd3s9bnv5lmvx1r55sndcq6z2bp"; + url = http://www.wireshark.org/download/src/wireshark-1.1.2.tar.gz; + sha256 = "0fsf84czzxg0gpyf525lx2c9i8la26fkhqv4visz5bz2r0911yd4"; }; + configureFlags = "--with-pcap=${libpcap}"; buildInputs = [perl pkgconfig gtk libpcap flex bison]; } diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index 324615500fee..5dbbf010be84 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -1,16 +1,23 @@ {stdenv, fetchurl, flex, bison}: stdenv.mkDerivation rec { - name = "libpcap-0.9.4"; + name = "libpcap-1.0.0"; src = fetchurl { url = [ "mirror://tcpdump/release/${name}.tar.gz" "http://www.sfr-fresh.com/unix/misc/${name}.tar.gz" ]; - sha256 = "0q0cnn607kfa4y4rbz3glg5lfr8r08s8l08w8fwrr3d6njjzd71p"; + sha256 = "1h3kmj485qz1i08xs4sc3a0bmhs1rvq0h7gycs7paap2szhw8552"; }; buildInputs = [flex bison]; - configureFlags = " - ${if stdenv.system == "i686-linux" then "--with-pcap=linux" else ""} - "; + configureFlags = [ + "${if stdenv.system == "i686-linux" then "--with-pcap=linux" else ""}" + "--with-pcap=linux" + ]; + + preInstall = ''ensureDir $out/bin''; + patches = if stdenv.system == "i686-linux" + then [] + else [ ./libpcap_amd64.patch ]; + } From f936925abfe7cfeb626eb4dd54b1529ab45e4103 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 12 Feb 2009 20:52:49 +0000 Subject: [PATCH 58/59] added cgdb (ncrurses based gdb frontend) svn path=/nixpkgs/trunk/; revision=14055 --- pkgs/tools/misc/cgdb/default.nix | 17 +++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/tools/misc/cgdb/default.nix diff --git a/pkgs/tools/misc/cgdb/default.nix b/pkgs/tools/misc/cgdb/default.nix new file mode 100644 index 000000000000..0f53f46ab1b4 --- /dev/null +++ b/pkgs/tools/misc/cgdb/default.nix @@ -0,0 +1,17 @@ +args: +args.stdenv.mkDerivation { + name = "cgdb-0.6.4"; + + src = args.fetchurl { + url = http://prdownloads.sourceforge.net/cgdb/cgdb-0.6.4.tar.gz?download; + sha256 = "10c03p3bbr1glyw7j2i2sv97riiksw972pdamcqdqrzzfdcly54w"; + }; + + buildInputs =(with args; [readline ncurses]); + + meta = { + description = "curses interface to gdb"; + homepage = http://cgdb.sourceforge.net/; + license ="GPLv2"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e982cd8a6bc..0cc47769ce22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -483,6 +483,10 @@ let inherit fetchurl stdenv; }; + cgdb = import ../tools/misc/cgdb { + inherit fetchurl stdenv ncurses readline; + }; + ccrypt = import ../tools/security/ccrypt { inherit fetchurl stdenv; }; From 15962e240eab03f6d569ef4c56e7ae7baf69073c Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 12 Feb 2009 20:54:31 +0000 Subject: [PATCH 59/59] doh svn path=/nixpkgs/trunk/; revision=14056 --- pkgs/tools/misc/cgdb/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/cgdb/default.nix b/pkgs/tools/misc/cgdb/default.nix index 0f53f46ab1b4..71dba9a712f7 100644 --- a/pkgs/tools/misc/cgdb/default.nix +++ b/pkgs/tools/misc/cgdb/default.nix @@ -3,7 +3,7 @@ args.stdenv.mkDerivation { name = "cgdb-0.6.4"; src = args.fetchurl { - url = http://prdownloads.sourceforge.net/cgdb/cgdb-0.6.4.tar.gz?download; + url = http://prdownloads.sourceforge.net/cgdb/cgdb-0.6.4.tar.gz; sha256 = "10c03p3bbr1glyw7j2i2sv97riiksw972pdamcqdqrzzfdcly54w"; };