summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
commit4b27d2870197b26b7c170caa333944231715d4a3 (patch)
tree6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/tools
parent6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff)
downloadnixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.gz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.bz2
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.lz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.xz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.zst
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.zip
Porting changes from stdenv-updates into this branch.
This comes from:
svn diff  ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff
patch -p0 < diff
and then adding into svn all files new from the patch.

trunk@18255 comes from the last time I updated stdenv-updates from trunk.


svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/compression/bzip2/default.nix8
-rw-r--r--pkgs/tools/compression/gzip/default.nix36
-rw-r--r--pkgs/tools/compression/gzip/getopt.patch54
-rw-r--r--pkgs/tools/compression/gzip/gnulib-futimens.patch42
-rw-r--r--pkgs/tools/misc/coreutils/7.5.nix28
-rw-r--r--pkgs/tools/misc/coreutils/default.nix10
-rw-r--r--pkgs/tools/networking/curl/default.nix10
-rw-r--r--pkgs/tools/networking/wget/default.nix43
-rw-r--r--pkgs/tools/networking/wget/gnutls-support.patch16
-rw-r--r--pkgs/tools/text/gawk/default.nix32
10 files changed, 208 insertions, 71 deletions
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix
index ddc31de6196..0523067cbad 100644
--- a/pkgs/tools/compression/bzip2/default.nix
+++ b/pkgs/tools/compression/bzip2/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{stdenv, fetchurl, linkStatic ? false}:
 
 stdenv.mkDerivation {
   name = "bzip2-1.0.5";
@@ -11,7 +11,11 @@ stdenv.mkDerivation {
   };
 
   sharedLibrary =
-    !stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin";
+    !stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
+
+  makeFlags = if linkStatic then "LDFLAGS=-static" else "";
+
+  inherit linkStatic;
     
   meta = {
     homepage = http://www.bzip.org;
diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix
index 0a2afd05372..7a25b69c013 100644
--- a/pkgs/tools/compression/gzip/default.nix
+++ b/pkgs/tools/compression/gzip/default.nix
@@ -1,17 +1,35 @@
 {stdenv, fetchurl}:
 
-stdenv.mkDerivation {
-  name = "gzip-1.3.12";
-  
+stdenv.mkDerivation rec {
+  name = "gzip-1.3.13";
+
   src = fetchurl {
-    url = http://ftp.gnu.org/gnu/gzip/gzip-1.3.12.tar.gz;
-    sha256 = "1bw7sm68xjlnlzgcx66hnw80ac1qqyvhw0vw27zilgbzbzh5nmiz";
+    url = "mirror://gnu/gzip/${name}.tar.gz";
+    sha256 = "18vwa7x0b1sql9bs2d15n94fx3him1m6xpnwsfz52djjbjgzy1hx";
   };
 
+  patches = [ ./getopt.patch ];
+
+  doCheck = true;
+
   meta = {
-    homepage = http://www.gzip.org/;
-    description = "The gzip compression program";
+    homepage = http://www.gnu.org/software/gzip/;
+    description = "Gzip, the GNU zip compression program";
+
+    longDescription =
+      ''gzip (GNU zip) is a popular data compression program written by
+        Jean-loup Gailly for the GNU project.  Mark Adler wrote the
+        decompression part.
+
+        We developed this program as a replacement for compress because of
+        the Unisys and IBM patents covering the LZW algorithm used by
+        compress.  These patents made it impossible for us to use compress,
+        and we needed a replacement.  The superior compression ratio of gzip
+        is just a bonus.
+      '';
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
   };
-  
-  patches = [./gnulib-futimens.patch];
 }
diff --git a/pkgs/tools/compression/gzip/getopt.patch b/pkgs/tools/compression/gzip/getopt.patch
new file mode 100644
index 00000000000..e61dd977810
--- /dev/null
+++ b/pkgs/tools/compression/gzip/getopt.patch
@@ -0,0 +1,54 @@
+See http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00089.html .
+
+From dd0ebefe4fe761f6f422a400430db53c64dbffd7 Mon Sep 17 00:00:00 2001
+From: Eric Blake <ebb9@byu.net>
+Date: Tue, 6 Oct 2009 20:44:13 -0600
+Subject: [PATCH] getopt: fix compilation on darwin
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* lib/getopt.in.h (includes): Leave breadcrumbs during system
+include.
+* lib/unistd.in.h (getopt): Use them to avoid recursive include.
+Reported by Ludovic Courtès.
+
+Signed-off-by: Eric Blake <ebb9@byu.net>
+---
+ ChangeLog       |    5 +++++
+ lib/getopt.in.h |    6 +++++-
+ lib/unistd.in.h |    2 +-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lib/getopt.in.h b/lib/getopt.in.h
+index 9de467a..7377f3c 100644
+--- a/lib/getopt.in.h
++++ b/lib/getopt.in.h
+@@ -22,9 +22,13 @@
+ @PRAGMA_SYSTEM_HEADER@
+ #endif
+
+-/* The include_next requires a split double-inclusion guard.  */
++/* The include_next requires a split double-inclusion guard.  We must
++   also inform the replacement unistd.h to not recursively use
++   <getopt.h>; our definitions will be present soon enough.  */
+ #if @HAVE_GETOPT_H@
++# define _GL_SYSTEM_GETOPT
+ # @INCLUDE_NEXT@ @NEXT_GETOPT_H@
++# undef _GL_SYSTEM_GETOPT
+ #endif
+
+ #ifndef _GL_GETOPT_H
+diff --git a/lib/unistd.in.h b/lib/unistd.in.h
+index 38e2e13..b6ea889 100644
+--- a/lib/unistd.in.h
++++ b/lib/unistd.in.h
+@@ -49,7 +49,7 @@
+ #endif
+
+ /* Get getopt(), optarg, optind, opterr, optopt.  */
+-#if @GNULIB_UNISTD_H_GETOPT@
++#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+ # include <getopt.h>
+ #endif
+
diff --git a/pkgs/tools/compression/gzip/gnulib-futimens.patch b/pkgs/tools/compression/gzip/gnulib-futimens.patch
index 5804bf27ff3..e69de29bb2d 100644
--- a/pkgs/tools/compression/gzip/gnulib-futimens.patch
+++ b/pkgs/tools/compression/gzip/gnulib-futimens.patch
@@ -1,42 +0,0 @@
-now hat glibc-2.6  declares futimens.
-http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00089.html
-
-diff -ru cpio-2.7.orig/lib/utimens.c cpio-2.7/lib/utimens.c
---- cpio-2.7.orig/lib/utimens.c	2007-05-20 21:23:57.000000000 +0900
-+++ cpio-2.7/lib/utimens.c	2007-05-21 08:40:22.000000000 +0900
-@@ -73,7 +73,7 @@
-    Return 0 on success, -1 (setting errno) on failure.  */
- 
- int
--futimens (int fd ATTRIBUTE_UNUSED,
-+gl_futimens (int fd ATTRIBUTE_UNUSED,
- 	  char const *file, struct timespec const timespec[2])
- {
-   /* There's currently no interface to set file timestamps with
-@@ -166,5 +166,5 @@
- int
- utimens (char const *file, struct timespec const timespec[2])
- {
--  return futimens (-1, file, timespec);
-+  return gl_futimens (-1, file, timespec);
- }
-diff -ru cpio-2.7.orig/lib/utimens.h cpio-2.7/lib/utimens.h
---- cpio-2.7.orig/lib/utimens.h	2007-05-20 21:23:57.000000000 +0900
-+++ cpio-2.7/lib/utimens.h	2007-05-21 08:39:57.000000000 +0900
-@@ -1,3 +1,3 @@
- #include "timespec.h"
--int futimens (int, char const *, struct timespec const [2]);
-+int gl_futimens (int, char const *, struct timespec const [2]);
- int utimens (char const *, struct timespec const [2]);
-diff -ur gzip-1.3.12.orig/gzip.c gzip-1.3.12/gzip.c
---- gzip-1.3.12.orig/gzip.c	2007-05-21 09:12:46.000000000 +0900
-+++ gzip-1.3.12/gzip.c	2007-05-21 09:13:14.000000000 +0900
-@@ -1637,7 +1637,7 @@
- 	}
-       }
- 
--    if (futimens (ofd, ofname, timespec) != 0)
-+    if (gl_futimens (ofd, ofname, timespec) != 0)
-       {
- 	int e = errno;
- 	WARN ((stderr, "%s: ", program_name));
diff --git a/pkgs/tools/misc/coreutils/7.5.nix b/pkgs/tools/misc/coreutils/7.5.nix
new file mode 100644
index 00000000000..90223c35483
--- /dev/null
+++ b/pkgs/tools/misc/coreutils/7.5.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, aclSupport ? false, acl}:
+
+stdenv.mkDerivation rec {
+  name = "coreutils-7.5";
+
+  src = fetchurl {
+    url = "mirror://gnu/coreutils/${name}.tar.gz";
+    sha256 = "1hf333y85fm0q7f1apx2zjjhivwj620nc8kcifdcm0sg8fwlj7rl";
+  };
+
+  buildInputs = stdenv.lib.optional aclSupport acl;
+
+  meta = {
+    homepage = http://www.gnu.org/software/coreutils/;
+    description = "The basic file, shell and text manipulation utilities of the GNU operating system";
+
+    longDescription = ''
+      The GNU Core Utilities are the basic file, shell and text
+      manipulation utilities of the GNU operating system.  These are
+      the core utilities which are expected to exist on every
+      operating system.
+    '';
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+  };
+}
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 5cff1d5712e..d1cccfa7196 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -1,15 +1,15 @@
 {stdenv, fetchurl, aclSupport ? false, acl}:
 
 stdenv.mkDerivation rec {
-  name = "coreutils-7.2";
-  
+  name = "coreutils-7.6";
+
   src = fetchurl {
     url = "mirror://gnu/coreutils/${name}.tar.gz";
-    sha256 = "1cpx66kwcg5w78by8i27wb24j0flz2ivv9fqmd4av8z5jbnbyxyx";
+    sha256 = "1m153jmnrg9v4x6qiw7azd3cjms13s32yihbzb7zi9bw8a5zx6qx";
   };
 
   buildInputs = stdenv.lib.optional aclSupport acl;
-  
+
   meta = {
     homepage = http://www.gnu.org/software/coreutils/;
     description = "The basic file, shell and text manipulation utilities of the GNU operating system";
@@ -22,5 +22,7 @@ stdenv.mkDerivation rec {
     '';
 
     license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index a29b8de1987..4a5fe228b22 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, zlibSupport ? false, zlib ? null, sslSupport ? false, openssl ? null}:
+{stdenv, fetchurl, zlibSupport ? false, zlib ? null, sslSupport ? false, openssl ? null, linkStatic ? false}:
 
 assert zlibSupport -> zlib != null;
 assert sslSupport -> openssl != null;
@@ -20,12 +20,20 @@ stdenv.mkDerivation rec {
     
   configureFlags = ''
     ${if sslSupport then "--with-ssl=${openssl}" else "--without-ssl"}
+    ${if linkStatic then "--enable-static --disable-shared" else ""}
   '';
+
+  dontDisableStatic = if linkStatic then true else false;
   
   CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
+  LDFLAGS = if linkStatic then "-static" else "";
   CXX = "g++";
   CXXCPP = "g++ -E";
 
+  # libtool hack to get a static binary. Notice that to 'configure' I passed
+  # other LDFLAGS, because it doesn't use libtool for linking in the tests.
+  makeFlags = if linkStatic then "LDFLAGS=-all-static" else "";
+
   passthru = {
     inherit sslSupport openssl;
   };
diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix
index a4618a53452..1e3171da00b 100644
--- a/pkgs/tools/networking/wget/default.nix
+++ b/pkgs/tools/networking/wget/default.nix
@@ -1,17 +1,46 @@
-{stdenv, fetchurl, gettext, openssl ? null}:
+{ stdenv, fetchurl, gettext, perl, gnutls ? null }:
 
 stdenv.mkDerivation rec {
-  name = "wget-1.11.4";
-  
+  name = "wget-1.12";
+
   src = fetchurl {
     url = "mirror://gnu/wget/${name}.tar.bz2";
-    sha256 = "1yr7w182n7lvkajvq07wnw65sw2vmxjkc3611kpc728vhvi54zwb";
+    sha256 = "16msgly5xn0qj6ngsw34q9j7ag8jkci6020w21d30jgqw8wdj8y8";
   };
 
-  buildInputs = [gettext openssl];
+  patches = [ ./gnutls-support.patch ];
+
+  preConfigure =
+    '' for i in "doc/texi2pod.pl" "tests/run-px" "util/rmold.pl"
+       do
+         sed -i "$i" -e 's|/usr/bin.*perl|${perl}/bin/perl|g'
+       done
+    '';
+
+  buildInputs = [ gettext perl ]
+    ++ stdenv.lib.optional (gnutls != null) gnutls;
+
+  configureFlags =
+    if gnutls != null
+    then "--with-ssl=gnutls"
+    else "";
+
+  doCheck = true;
 
   meta = {
-    description = "A console downloading program. Has some features for mirroring sites.";
-    homepage = http://www.gnu.org/software/wget;
+    description = "GNU Wget, a tool for retrieving files using HTTP, HTTPS, and FTP";
+
+    longDescription =
+      '' GNU Wget is a free software package for retrieving files using HTTP,
+         HTTPS and FTP, the most widely-used Internet protocols.  It is a
+         non-interactive commandline tool, so it may easily be called from
+         scripts, cron jobs, terminals without X-Windows support, etc.
+      '';
+
+    license = "GPLv3+";
+
+    homepage = http://www.gnu.org/software/wget/;
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/tools/networking/wget/gnutls-support.patch b/pkgs/tools/networking/wget/gnutls-support.patch
new file mode 100644
index 00000000000..fa0c5cc06c0
--- /dev/null
+++ b/pkgs/tools/networking/wget/gnutls-support.patch
@@ -0,0 +1,16 @@
+This patch fixes GnuTLS support:
+
+  http.o: In function `gethttp':
+  http.c:(.text+0x26c6): undefined reference to `ssl_connect_wget'
+
+--- wget-1.12/src/http.c	2009-09-22 05:02:18.000000000 +0200
++++ wget-1.12/src/http.c	2009-10-03 17:24:46.000000000 +0200
+@@ -1762,7 +1762,7 @@ gethttp (struct url *u, struct http_stat
+ 
+       if (conn->scheme == SCHEME_HTTPS)
+         {
+-          if (!ssl_connect_wget (sock))
++          if (!ssl_connect (sock))
+             {
+               fd_close (sock);
+               return CONSSLERR;
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix
index 10dd08214af..138b4e01f78 100644
--- a/pkgs/tools/text/gawk/default.nix
+++ b/pkgs/tools/text/gawk/default.nix
@@ -1,15 +1,35 @@
 {stdenv, fetchurl}:
 
-stdenv.mkDerivation {
-  name = "gawk-3.1.6";
-  
+stdenv.mkDerivation rec {
+  name = "gawk-3.1.7";
+
   src = fetchurl {
-    url = mirror://gnu/gawk/gawk-3.1.6.tar.bz2;
-    sha256 = "0v6ba4hxfiiy3bny5japd3zmzxlh8vdkmswk96yngd6i1dddsgsi";
+    url = "mirror://gnu/gawk/${name}.tar.bz2";
+    sha256 = "0wfyiqc28cxb5wjbdph4y33h1fdf56nj6cm7as546niwjsw7cazi";
   };
 
+  doCheck = true;
+
   meta = {
     homepage = http://www.gnu.org/software/gawk/;
-    description = "GNU implementation of the AWK programming language";
+    description = "GNU implementation of the Awk programming language";
+
+    longDescription = ''
+      Many computer users need to manipulate text files: extract and then
+      operate on data from parts of certain lines while discarding the rest,
+      make changes in various text files wherever certain patterns appear,
+      and so on.  To write a program to do these things in a language such as
+      C or Pascal is a time-consuming inconvenience that may take many lines
+      of code.  The job is easy with awk, especially the GNU implementation:
+      Gawk.
+
+      The awk utility interprets a special-purpose programming language that
+      makes it possible to handle many data-reformatting jobs with just a few
+      lines of code.
+    '';
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }