From 4df190c703f8779fcbdc32df19e6fbed36654e99 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 10 Feb 2008 16:44:43 +0000 Subject: [PATCH] Various fixes and updates to build that all. svn path=/nixpkgs/branches/stdenv-updates/; revision=10568 --- .../ImageMagick/{default.nix => 6.3.8-5.nix} | 4 +-- .../development/tools/misc/elfutils/0.127.nix | 1 + .../misc/ltrace/{default.nix => 0.5-3deb.nix} | 15 ++++++-- pkgs/lib/default.nix | 4 +++ pkgs/os-specific/linux/dvd+rw-tools/7.0.nix | 3 +- pkgs/servers/xmpp/ejabberd/builder.sh | 2 +- pkgs/servers/xmpp/ejabberd/default.nix | 6 ++-- pkgs/tools/compression/lzma/default.nix | 18 ++++++++++ pkgs/tools/misc/dosfstools/2.11deb.nix | 33 ++++++++++++++++++ pkgs/tools/networking/nc6/1.0.nix | 25 ++++++++++++++ pkgs/tools/networking/socat/1.6.0.0.nix | 34 +++++++++++++++++++ pkgs/tools/networking/socat/2.0.0-b1.nix | 25 ++++++++++++++ pkgs/top-level/all-packages.nix | 29 ++++++++++++++-- 13 files changed, 187 insertions(+), 12 deletions(-) rename pkgs/applications/graphics/ImageMagick/{default.nix => 6.3.8-5.nix} (81%) rename pkgs/development/tools/misc/ltrace/{default.nix => 0.5-3deb.nix} (54%) create mode 100644 pkgs/tools/compression/lzma/default.nix create mode 100644 pkgs/tools/misc/dosfstools/2.11deb.nix create mode 100644 pkgs/tools/networking/nc6/1.0.nix create mode 100644 pkgs/tools/networking/socat/1.6.0.0.nix create mode 100644 pkgs/tools/networking/socat/2.0.0-b1.nix diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/6.3.8-5.nix similarity index 81% rename from pkgs/applications/graphics/ImageMagick/default.nix rename to pkgs/applications/graphics/ImageMagick/6.3.8-5.nix index 67df0c7b3c4..87e40ae74a1 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/6.3.8-5.nix @@ -3,8 +3,8 @@ stdenv.mkDerivation (rec { name = "ImageMagick-6.3.8-2"; src = fetchurl { - url = "ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2"; - sha256 = "05bp10dzpw691w8hdw0n2xr65194xgslpqhzf4xbxla7gz8clnmg"; + url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.8-5.tar.bz2; + sha256 = "0lsvi2z5b5zam6yvjzsyjpa36rg1c0kczifz73k9b4v8zz9a9vfl"; }; configureFlags = " --with-dots --with-gs-font-dir="+ ghostscript + diff --git a/pkgs/development/tools/misc/elfutils/0.127.nix b/pkgs/development/tools/misc/elfutils/0.127.nix index 2337ebbdbd0..efa91fa637c 100644 --- a/pkgs/development/tools/misc/elfutils/0.127.nix +++ b/pkgs/development/tools/misc/elfutils/0.127.nix @@ -6,4 +6,5 @@ stdenv.mkDerivation { url = http://nix.cs.uu.nl/dist/tarballs/elfutils-0.127.tar.gz; sha256 = "12n3h5r3c24a6l2wxz0w2dqq072bvgms0dzckivrwp5vdn22lpdv"; }; + preBuild = "sed -e 's/-Werror//' -i */Makefile "; } diff --git a/pkgs/development/tools/misc/ltrace/default.nix b/pkgs/development/tools/misc/ltrace/0.5-3deb.nix similarity index 54% rename from pkgs/development/tools/misc/ltrace/default.nix rename to pkgs/development/tools/misc/ltrace/0.5-3deb.nix index cd77984ded6..bff3e6a8fbc 100644 --- a/pkgs/development/tools/misc/ltrace/default.nix +++ b/pkgs/development/tools/misc/ltrace/0.5-3deb.nix @@ -1,5 +1,10 @@ -args : with args; - let localDefs = builderDefs { +args : with args; let + patch = fetchurl { + url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5-3.diff.gz; + sha256 = "0rin25si7117wld5bc7vf3d73c5k9ph3zach7cbg9h9vvz376c26"; + }; + localDefs = with (builderDefs {src="";} null); + builderDefs { src = /* put a fetchurl here */ fetchurl { url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz; @@ -11,6 +16,10 @@ args : with args; goSrcDir = " cd ltrace-*; "; + preBuild = FullDepEntry ('' + gunzip < ${patch} | patch -Np1 + sed -e s@-Werror@@ -i Makefile.in + '')["minInit" "doUnpack"]; } null; /* null is a terminator for sumArgs */ in with localDefs; let @@ -21,7 +30,7 @@ in stdenv.mkDerivation rec { name = "ltrace-0.5"; builder = writeScript (name + "-builder") - (textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare]); + (textClosure localDefs [preBuild preConfigure doConfigure doMakeInstall doForceShare]); meta = { description = " Library call tracer. diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 87d08ab7c1c..1018d960907 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -176,6 +176,10 @@ rec { # (e.g. `++ optional (system == "i686-linux") flashplayer'). optional = cond: elem: if cond then [elem] else []; + + # Return a list or an empty list, dependening on a boolean value. + optionals = cond: elems: if cond then elems else []; + # Return a list of integers from `first' up to and including `last'. range = first: last: diff --git a/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix b/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix index 658bdbf55fa..091f0c910f6 100644 --- a/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix +++ b/pkgs/os-specific/linux/dvd+rw-tools/7.0.nix @@ -13,13 +13,14 @@ args : with args; in with localDefs; let preBuild = FullDepEntry (" + sed -e '1i#define INT_MAX __INT_MAX__' -i *.c *.cpp sed -e 's@/usr/local@'\$out'@g' -i Makefile.m4 Makefile ") [minInit doUnpack]; in stdenv.mkDerivation rec { name = "dvd+rw-tools-"+version; builder = writeScript (name + "-builder") - (textClosure localDefs [preBuild doMakeInstall doForceShare doPropagate]); + (textClosure localDefs [preBuild addInputs (doDump "0") doMakeInstall doForceShare doPropagate]); meta = { description = " DVD+RW tools. diff --git a/pkgs/servers/xmpp/ejabberd/builder.sh b/pkgs/servers/xmpp/ejabberd/builder.sh index 4abf8da0682..3d746054f38 100644 --- a/pkgs/servers/xmpp/ejabberd/builder.sh +++ b/pkgs/servers/xmpp/ejabberd/builder.sh @@ -3,7 +3,7 @@ buildInputs="$expat $erlang $zlib $openssl" source $stdenv/setup tar xfvz $src -cd $name/src +cd ejabberd-*/src ./configure --prefix=$out make make install diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix index 8ce1b0912de..c3c88337c5d 100644 --- a/pkgs/servers/xmpp/ejabberd/default.nix +++ b/pkgs/servers/xmpp/ejabberd/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, expat, erlang, zlib, openssl}: stdenv.mkDerivation { - name = "ejabberd-1.1.4"; + name = "ejabberd-2.0.0-rc1"; builder = ./builder.sh; src = fetchurl { - url = http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4.tar.gz; - md5 = "65e9cd346f11a28afbacfe1d7be3a33b"; + url = http://www.process-one.net/downloads/ejabberd/2.0.0-rc1/ejabberd-2.0.0-rc1.tar.gz; + sha256 = "02ldssvsy0rkvxm96018fpk5lc3iqgkrira9cw1ym2snas0k8nzy"; }; inherit expat erlang zlib openssl; } diff --git a/pkgs/tools/compression/lzma/default.nix b/pkgs/tools/compression/lzma/default.nix new file mode 100644 index 00000000000..67ef9c3add1 --- /dev/null +++ b/pkgs/tools/compression/lzma/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "lzma-4.32.5"; + + src = fetchurl { + url = http://tukaani.org/lzma/lzma-4.32.5.tar.gz; + sha256 = "1mqy1biy46gqky6n3gyr2l395hwckh0xyi96waz5p5x8mgp372ch"; + }; + + CFLAGS = "-O3"; + CXXFLAGS = "-O3"; + + meta = { + homepage = http://tukaani.org/lzma/; + description = "The LZMA compression program"; + }; +} diff --git a/pkgs/tools/misc/dosfstools/2.11deb.nix b/pkgs/tools/misc/dosfstools/2.11deb.nix new file mode 100644 index 00000000000..13f327dcff5 --- /dev/null +++ b/pkgs/tools/misc/dosfstools/2.11deb.nix @@ -0,0 +1,33 @@ +args : with args; with builderDefs {src="";} null; + let patch = + fetchurl { + url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_2.11-2.3.diff.gz; + sha256 = "0bzjhpgg4ih6c76ax8byis9vxgkr2c7bbbshqrkfq8j7ar48n5ld"; + }; + localDefs = builderDefs (rec { + src = /* put a fetchurl here */ + fetchurl { + url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_2.11.orig.tar.gz; + sha256 = "1154k0y04npblgac81p4pcmglilk1ldrqll4hvbrwgcb7096vb0f"; + }; + preBuild = FullDepEntry ('' + gunzip < ${patch} | patch -Np1 + '')["minInit" "doUnpack"]; + + buildInputs = []; + configureFlags = []; + makeFlags = " PREFIX=$out "; + }) null; /* null is a terminator for sumArgs */ + 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"; + }; +} diff --git a/pkgs/tools/networking/nc6/1.0.nix b/pkgs/tools/networking/nc6/1.0.nix new file mode 100644 index 00000000000..1a28e3b0cad --- /dev/null +++ b/pkgs/tools/networking/nc6/1.0.nix @@ -0,0 +1,25 @@ +args : with args; with builderDefs {src="";} null; +let localDefs = builderDefs (rec { + src = /* put a fetchurl here */ + fetchurl { + url = ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/nc6-1.0.tar.bz2; + sha256 = "01l28zv1yal58ilfnz6albdzqqxzsx3a58vmc14r9gv0bahffdgb"; + }; + + buildInputs = []; + configureFlags = []; + }) null; /* null is a terminator for sumArgs */ +in with localDefs; +stdenv.mkDerivation rec { + name = "nc6-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [doConfigure doMakeInstall doForceShare doPropagate]); + meta = { + description = " + nc6 - one more netcat, IPv6 support included. + "; + homepage = "http://www.deepspace6.net/projects/netcat6.html"; + }; +} + diff --git a/pkgs/tools/networking/socat/1.6.0.0.nix b/pkgs/tools/networking/socat/1.6.0.0.nix new file mode 100644 index 00000000000..1e176f47720 --- /dev/null +++ b/pkgs/tools/networking/socat/1.6.0.0.nix @@ -0,0 +1,34 @@ +args : with args; with builderDefs {src="";} null; + let localDefs = builderDefs (rec { + src = /* put a fetchurl here */ + fetchurl { + url = http://www.dest-unreach.org/socat/download/socat-1.6.0.0.tar.bz2; + sha256 = "1j01iazwfr63q71cfcfzrdz8digqlg3ldhlbb72yl5mn9awr0w0m"; + }; + patches = [ + (fetchurl { + url = http://www.dest-unreach.org/socat/contrib/socat-servicenames.patch; + sha256 = "1r8zd6mk257n01i34i5syxl2k6fr35nlr7bqs9sfc79irjl62z66"; + }) + (fetchurl { + url = http://www.dest-unreach.org/socat/contrib/socat-maxfds.patch.gz; + sha256 = "0fsn0k0qsrdbjbhj09a6kxfsxb7yhxs4cad26znd9naginsj7pxa"; + }) + ]; + buildInputs = [openssl]; + configureFlags = []; + }) null; /* null is a terminator for sumArgs */ + in with localDefs; +stdenv.mkDerivation rec { + name = "socat-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [doPatch doConfigure doMakeInstall doForceShare doPropagate]); + meta = { + description = " + Socat, one more analogue of netcat, but not mimicking it. + 'netcat++' (extended design, new implementation) +"; + homepage = "http://www.dest-unreach.org/socat/"; + }; +} diff --git a/pkgs/tools/networking/socat/2.0.0-b1.nix b/pkgs/tools/networking/socat/2.0.0-b1.nix new file mode 100644 index 00000000000..5fb3fee7879 --- /dev/null +++ b/pkgs/tools/networking/socat/2.0.0-b1.nix @@ -0,0 +1,25 @@ +args : with args; with builderDefs {src="";} null; + let localDefs = builderDefs (rec { + src = /* put a fetchurl here */ + fetchurl { + url = http://www.dest-unreach.org/socat/download/socat-2.0.0-b1.tar.bz2; + sha256 = "0ybd5fw22icl10r33k987rskh9gvysm1jph90a1pfdjj57cy44fk"; + }; + + buildInputs = [openssl]; + configureFlags = []; + }) null; /* null is a terminator for sumArgs */ + in with localDefs; +stdenv.mkDerivation rec { + name = "socat-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [doPatch doConfigure doMakeInstall doForceShare doPropagate]); + meta = { + description = " + Socat, one more analogue of netcat, but not mimicking it. + 'netcat++' (extended design, new implementation) +"; + homepage = "http://www.dest-unreach.org/socat/"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f211793b1a..eaf25a2a069 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -417,6 +417,13 @@ rec { inherit fetchurl stdenv coreutils; }); + dosfstoolsFun = lib.sumArgs (selectVersion ../tools/misc/dosfstools "2.11deb") + { + inherit builderDefs; + }; + + dosfstools = dosfstoolsFun null; + ed = import ../tools/text/ed { inherit fetchurl stdenv; }; @@ -612,6 +619,10 @@ rec { inherit fetchurl stdenv ghc tetex polytable; }; + lzma = import ../tools/compression/lzma { + inherit fetchurl stdenv; + }; + man = import ../tools/misc/man { inherit fetchurl stdenv db4 groff; }; @@ -639,6 +650,12 @@ rec { inherit fetchurl stdenv gettext; }; + nc6Fun = lib.sumArgs (selectVersion ../tools/networking/nc6 "1.0") { + inherit builderDefs; + }; + + nc6 = nc6Fun null; + ncat = import ../tools/networking/ncat { inherit fetchurl stdenv openssl; }; @@ -763,6 +780,12 @@ rec { smbfsFuse = smbfsFuseFun null; + socatFun = lib.sumArgs (selectVersion ../tools/networking/socat "1.6.0.0") { + inherit builderDefs openssl; + }; + + socat = socatFun null; + sudo = import ../tools/security/sudo { inherit fetchurl stdenv coreutils pam; }; @@ -1588,11 +1611,13 @@ rec { inherit fetchurl stdenv; }; - ltrace = import ../development/tools/misc/ltrace { + ltraceFun = lib.sumArgs (selectVersion ../development/tools/misc/ltrace "0.5-3deb") { inherit fetchurl stdenv builderDefs stringsWithDeps lib; elfutils = elfutilsFun {version = "0.127";} null; }; + ltrace = ltraceFun null; + mk = import ../development/tools/build-managers/mk { inherit fetchurl stdenv; }; @@ -4228,7 +4253,7 @@ rec { inherit (xlibs) libX11 libXft libXext libXinerama libXrandr; }; - imagemagickFun = lib.sumArgs (import ../applications/graphics/ImageMagick) { + imagemagickFun = lib.sumArgs (selectVersion ../applications/graphics/ImageMagick "6.3.8-5" ) { inherit stdenv fetchurl libtool; };