diff options
Diffstat (limited to 'pkgs/tools')
51 files changed, 276 insertions, 250 deletions
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 3fbb350e0ab0..929332275fc1 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "1s1z6r0r78qvf59ci3vxammjz7lj5m64jyk0bfn7yxd5jl3sy41y"; }; - buildNativeInputs = [ cython ]; + nativeBuildInputs = [ cython ]; buildInputs = [ pkgconfig python pygtk gtk ffmpeg x264 libvpx makeWrapper diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index f74463b10635..c6fbff30afa6 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -25,9 +25,9 @@ stdenv.mkDerivation rec { inherit fontDirectories; patchPhase = '' - sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.hostDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am - sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.hostDrv else xkbcomp}/bin";' unix/vncserver - sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.hostDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver + sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am + sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.crossDrv else xkbcomp}/bin";' unix/vncserver + sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver fontPath= for i in $fontDirectories; do @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ''; crossAttrs = { - buildInputs = (map (x : x.hostDrv) (buildInputs ++ [ + buildInputs = (map (x : x.crossDrv) (buildInputs ++ [ fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto fontsproto videoproto compositeproto scrnsaverproto resourceproto libxkbfile libXfont libpciaccess xineramaproto @@ -82,13 +82,13 @@ stdenv.mkDerivation rec { libXinerama libXcursor libxcrypt ]; - buildNativeInputs = + nativeBuildInputs = [ autoconf automake cvs utilmacros fontutil libtool flex bison cmake ] - ++ xorgserver.buildNativeInputs; + ++ xorgserver.nativeBuildInputs; - propagatedBuildNativeInputs = xorgserver.propagatedBuildNativeInputs; + propagatedNativeBuildInputs = xorgserver.propagatedNativeBuildInputs; meta = { homepage = http://www.tigervnc.org/; diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 4ef973bd56a0..51d5d35fe800 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "gnutar-1.26"; src = fetchurl { @@ -8,6 +8,12 @@ stdenv.mkDerivation (rec { sha256 = "0hbdkzmchq9ycr2x1pxqdcgdbaxksh8c6ac0jf75jajhcks6jlss"; }; + patches = [ ./gets-undeclared.patch ]; + + # May have some issues with root compilation because the bootstrap tool + # cannot be used as a login shell for now. + FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux") "1"; + meta = { homepage = http://www.gnu.org/software/tar/; description = "GNU implementation of the `tar' archiver"; @@ -33,18 +39,3 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; } - # May have some issues with root compilation because the bootstrap tool - # cannot be used as a login shell for now. -// stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux") { - FORCE_UNSAFE_CONFIGURE = 1; -} - -// - -{ - crossAttrs = - # XXX: Temporary workaround to allow GNU/Hurd builds with newer libcs. - (stdenv.lib.optionalAttrs (stdenv.cross.config == "i586-pc-gnu") { - patches = [ ./gets-undeclared.patch ]; - }); -}) diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 2773e112a49b..7346b8e4e058 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -8,6 +8,13 @@ stdenv.mkDerivation rec { sha256 = "1mallg1gprimlggdisfzdmh1xi676jsfdlfyvanlcw72ny8fsj3g"; }; + preConfigure = + '' + # Fix for building on Glibc 2.16. Won't be needed once the + # gnulib in sharutils is updated. + sed -i '/gets is a security hole/d' lib/stdio.in.h + ''; + # GNU Gettext is needed on non-GNU platforms. buildInputs = [ gettext ]; diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index 7ba5175d550b..7062053703e8 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { rev = "458e92da32ddd3c18fc1c3e52a76e9f0b48b832f"; }; - buildNativeInputs = [ pandoc perl makeWrapper ]; + nativeBuildInputs = [ pandoc perl makeWrapper ]; buildInputs = [ python git ]; diff --git a/pkgs/tools/bluetooth/obexd/default.nix b/pkgs/tools/bluetooth/obexd/default.nix index 1cf3918c21fc..47db0877dd20 100644 --- a/pkgs/tools/bluetooth/obexd/default.nix +++ b/pkgs/tools/bluetooth/obexd/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ glib dbus.libs openobex bluez libical ]; - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; meta = { homepage = http://www.bluez.org/; diff --git a/pkgs/tools/compression/bzip2/builder.sh b/pkgs/tools/compression/bzip2/builder.sh index 4610bdd40850..a598dfcf808c 100644 --- a/pkgs/tools/compression/bzip2/builder.sh +++ b/pkgs/tools/compression/bzip2/builder.sh @@ -10,7 +10,7 @@ if test -n "$sharedLibrary"; then preInstall() { mkdir -p $out/lib mv libbz2.so* $out/lib - ln -s libbz2.so.1.0 $out/lib/libbz2.so + (cd $out/lib && ln -s libbz2.so.1.0.? libbz2.so && ln -s libbz2.so.1.0.? libbz2.so.1); } fi diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index e1d6d75da51a..d15b26f48b65 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -1,15 +1,13 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl }: -stdenv.mkDerivation (rec { - name = "gzip-1.4"; +stdenv.mkDerivation rec { + name = "gzip-1.5"; src = fetchurl { - url = "mirror://gnu/gzip/${name}.tar.gz"; - sha256 = "1vhiyzls60fws48scw48wvwn8mpv1f4yhcsnafys239qvb9wyrni"; + url = "mirror://gnu/gzip/${name}.tar.xz"; + sha256 = "0wx1nqk709kx75cwp2axachnbxryp4gyl06qxn5nl95184w0mhls"; }; - doCheck = true; - meta = { homepage = http://www.gnu.org/software/gzip/; description = "Gzip, the GNU zip compression program"; @@ -31,13 +29,3 @@ stdenv.mkDerivation (rec { maintainers = [ stdenv.lib.maintainers.ludo ]; }; } - -// - -{ - crossAttrs = - # XXX: Temporary workaround to allow GNU/Hurd builds with newer libcs. - (stdenv.lib.optionalAttrs (stdenv.cross.config == "i586-pc-gnu") { - patches = [ ./gets-undeclared.patch ]; - }); -}) diff --git a/pkgs/tools/compression/gzip/gets-undeclared.patch b/pkgs/tools/compression/gzip/gets-undeclared.patch deleted file mode 100644 index a09f59b122a2..000000000000 --- a/pkgs/tools/compression/gzip/gets-undeclared.patch +++ /dev/null @@ -1,26 +0,0 @@ -This patch is needed to allow builds with newer versions of -the GNU libc (2.16+). - -This is a backport of this patch: - -commit 66712c23388e93e5c518ebc8515140fa0c807348 -Author: Eric Blake <eblake@redhat.com> -Date: Thu Mar 29 13:30:41 2012 -0600 - - stdio: don't assume gets any more - ---- gzip/lib/stdio.in.h 2012-07-02 14:28:45.000000000 +0200 -+++ gzip/lib/stdio.in.h 2012-07-02 14:28:50.000000000 +0200 -@@ -160,12 +160,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not - "use gnulib module fflush for portable POSIX compliance"); - #endif - --/* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ --#undef gets --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -- - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 78a8ed95a4e9..6b74ba41ecab 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "xz-5.0.3"; + name = "xz-5.0.4"; src = fetchurl { url = "http://tukaani.org/xz/${name}.tar.bz2"; - sha256 = "1sgaq4gdh8llz3gnlgvd65x610fwc8h4m32skhqn5npwgghvj4as"; + sha256 = "14nf55b47335aakswqk0kqv1qsh4269rnb757dmkkbd1sdhb1naw"; }; doCheck = true; diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix index cedb8df39d14..a306a424ee1e 100644 --- a/pkgs/tools/filesystems/ntfs-3g/default.nix +++ b/pkgs/tools/filesystems/ntfs-3g/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; buildInputs = [libuuid] ++ stdenv.lib.optionals crypto [gnutls libgcrypt]; - buildNativeInputs = stdenv.lib.optional crypto pkgconfig; + nativeBuildInputs = stdenv.lib.optional crypto pkgconfig; src = fetchurl { url = "http://tuxera.com/opensource/${name}.tgz"; diff --git a/pkgs/tools/graphics/enblend-enfuse/default.nix b/pkgs/tools/graphics/enblend-enfuse/default.nix index f1759d7a7820..b77d63d510df 100644 --- a/pkgs/tools/graphics/enblend-enfuse/default.nix +++ b/pkgs/tools/graphics/enblend-enfuse/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ libtiff libpng lcms libxmi boost mesa freeglut glew ]; - buildNativeInputs = [ perl pkgconfig ]; + nativeBuildInputs = [ perl pkgconfig ]; patches = let diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix index 0c829eab1309..9b0a83725eaa 100644 --- a/pkgs/tools/graphics/pfstools/default.nix +++ b/pkgs/tools/graphics/pfstools/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ libtiff openexr imagemagick libjpeg qt4 mesa freeglut bzip2 libX11 libpng expat ]; - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; meta = { homepage = http://pfstools.sourceforge.net/; diff --git a/pkgs/tools/graphics/qrencode/default.nix b/pkgs/tools/graphics/qrencode/default.nix index 866b121f76ba..3b83a18fd36e 100644 --- a/pkgs/tools/graphics/qrencode/default.nix +++ b/pkgs/tools/graphics/qrencode/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ libpng ]; - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; meta = { homepage = http://fukuchi.org/works/qrencode/; diff --git a/pkgs/tools/misc/coreutils/8.19.nix b/pkgs/tools/misc/coreutils/8.19.nix new file mode 100644 index 000000000000..f3bee5519600 --- /dev/null +++ b/pkgs/tools/misc/coreutils/8.19.nix @@ -0,0 +1,70 @@ +{ stdenv, fetchurl, perl, gmp ? null +, aclSupport ? false, acl ? null +, selinuxSupport? false, libselinux ? null, libsepol ? null +}: + +assert aclSupport -> acl != null; +assert selinuxSupport -> libselinux != null && libsepol != null; + +stdenv.mkDerivation rec { + name = "coreutils-8.19"; + + src = fetchurl { + url = "mirror://gnu/coreutils/${name}.tar.xz"; + sha256 = "1rx9x3fp848w4nny7irdkcpkan9fcx24d99v5dkwgkyq7wc76f5d"; + }; + + nativeBuildInputs = [ perl ]; + buildInputs = [ gmp ] + ++ stdenv.lib.optional aclSupport acl + ++ stdenv.lib.optional selinuxSupport libselinux + ++ stdenv.lib.optional selinuxSupport libsepol; + + crossAttrs = ({ + buildInputs = [ gmp ] + ++ stdenv.lib.optional aclSupport acl.crossDrv + ++ stdenv.lib.optional selinuxSupport libselinux.crossDrv + ++ stdenv.lib.optional selinuxSupport libsepol.crossDrv + ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv) + stdenv.gccCross.libc.libiconv.crossDrv; + + # Needed for fstatfs() + # I don't know why it is not properly detected cross building with glibc. + configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ]; + doCheck = false; + } + + // + + # XXX: Temporary workaround to allow GNU/Hurd builds with newer libcs. + (stdenv.lib.optionalAttrs (stdenv.cross.config == "i586-pc-gnu") { + patches = [ ./gets-undeclared.patch ]; + })); + + # The tests are known broken on Cygwin + # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025), + # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351), + # and {Open,Free}BSD. + doCheck = stdenv ? glibc; + + enableParallelBuilding = true; + + NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol"; + + 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 9d9ea52f3f58..9fd1d86ff82a 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -4,17 +4,17 @@ }: assert aclSupport -> acl != null; -assert selinuxSupport -> ( (libselinux != null) && (libsepol != null) ); +assert selinuxSupport -> libselinux != null && libsepol != null; stdenv.mkDerivation rec { - name = "coreutils-8.15"; + name = "coreutils-8.20"; src = fetchurl { url = "mirror://gnu/coreutils/${name}.tar.xz"; - sha256 = "176lgw810xw84c6fz5xwhydxggkndmzggl0pxqzldbjf85vv6zl3"; + sha256 = "1cly97xdy3v4nbbx631k43smqw0nnpn651kkprs0yyl2cj3pkjyv"; }; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; buildInputs = [ gmp ] ++ stdenv.lib.optional aclSupport acl ++ stdenv.lib.optional selinuxSupport libselinux @@ -22,11 +22,11 @@ stdenv.mkDerivation rec { crossAttrs = ({ buildInputs = [ gmp ] - ++ stdenv.lib.optional aclSupport acl.hostDrv - ++ stdenv.lib.optional selinuxSupport libselinux.hostDrv - ++ stdenv.lib.optional selinuxSupport libsepol.hostDrv + ++ stdenv.lib.optional aclSupport acl.crossDrv + ++ stdenv.lib.optional selinuxSupport libselinux.crossDrv + ++ stdenv.lib.optional selinuxSupport libsepol.crossDrv ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv) - stdenv.gccCross.libc.libiconv.hostDrv; + stdenv.gccCross.libc.libiconv.crossDrv; # Needed for fstatfs() # I don't know why it is not properly detected cross building with glibc. @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025), # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351), # and {Open,Free}BSD. - doCheck = (stdenv ? glibc); + doCheck = stdenv ? glibc; enableParallelBuilding = true; diff --git a/pkgs/tools/misc/file/511.nix b/pkgs/tools/misc/file/511.nix deleted file mode 100644 index 4e62462b8b35..000000000000 --- a/pkgs/tools/misc/file/511.nix +++ /dev/null @@ -1,17 +0,0 @@ -{stdenv, fetchurl, zlib}: - -stdenv.mkDerivation rec { - name = "file-5.11"; - - buildInputs = [ zlib ]; - - src = fetchurl { - url = "ftp://ftp.astron.com/pub/file/${name}.tar.gz"; - sha256 = "c70ae29a28c0585f541d5916fc3248c3e91baa481f63d7ccec53d1534cbcc9b7"; - }; - - meta = { - description = "A program that shows the type of files"; - homepage = "http://darwinsys.com/file"; - }; -} diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 38fb0b78cb13..d7e88ec1a8cd 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -1,18 +1,17 @@ -{stdenv, fetchurl}: - -stdenv.mkDerivation { - name = "file-5.04"; +{stdenv, fetchurl, zlib}: + +stdenv.mkDerivation rec { + name = "file-5.11"; + + buildInputs = [ zlib ]; src = fetchurl { - urls = [ - ftp://ftp.astron.com/pub/file/file-5.04.tar.gz - http://pkgs.fedoraproject.org/repo/pkgs/file/file-5.04.tar.gz/accade81ff1cc774904b47c72c8aeea0/file-5.04.tar.gz - ]; - sha256 = "0316lj3jxmp2g8azv0iykmmwjsnjanq93bklccwb6k77jiwnx7jc"; + url = "ftp://ftp.astron.com/pub/file/${name}.tar.gz"; + sha256 = "c70ae29a28c0585f541d5916fc3248c3e91baa481f63d7ccec53d1534cbcc9b7"; }; meta = { description = "A program that shows the type of files"; - homepage = ftp://ftp.astron.com/pub/file; + homepage = "http://darwinsys.com/file"; }; } diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index eeb6b852e61f..88cb2c313c0a 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"; }; - buildNativeInputs = [coreutils]; + nativeBuildInputs = [coreutils]; patches = [ ./findutils-path.patch ./change_echo_path.patch ]; diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index d37ce9f5aac4..d824d76a8649 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { sha256 = "0n64hpmsccvicagvr0c6v0kgp2yw0kgnd3jvsyd26cnwgs7c6kkq"; }; - buildNativeInputs = [ flex bison ]; + nativeBuildInputs = [ flex bison ]; buildInputs = [ ncurses libusb freetype gettext devicemapper ] ++ stdenv.lib.optional doCheck qemu; @@ -43,6 +43,10 @@ stdenv.mkDerivation rec { # See <http://www.mail-archive.com/qemu-devel@nongnu.org/msg22775.html>. sed -i "tests/util/grub-shell.in" \ -e's/qemu-system-i386/qemu-system-x86_64 -nodefaults/g' + + # Fix for building on Glibc 2.16. Won't be needed once the + # gnulib in grub is updated. + sed -i '/gets is a security hole/d' grub-core/gnulib/stdio.in.h ''; prePatch = diff --git a/pkgs/tools/misc/idutils/default.nix b/pkgs/tools/misc/idutils/default.nix index 4b81d48b0278..b76b9a187151 100644 --- a/pkgs/tools/misc/idutils/default.nix +++ b/pkgs/tools/misc/idutils/default.nix @@ -8,6 +8,13 @@ stdenv.mkDerivation rec { sha256 = "1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1"; }; + preConfigure = + '' + # Fix for building on Glibc 2.16. Won't be needed once the + # gnulib in idutils is updated. + sed -i '/gets is a security hole/d' lib/stdio.in.h + ''; + buildInputs = stdenv.lib.optional stdenv.isLinux emacs; doCheck = true; diff --git a/pkgs/tools/misc/ttf2pt1/default.nix b/pkgs/tools/misc/ttf2pt1/default.nix index 379db7d533f0..659b04a62386 100644 --- a/pkgs/tools/misc/ttf2pt1/default.nix +++ b/pkgs/tools/misc/ttf2pt1/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { ''; buildInputs = [ freetype ]; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; patches = ./gentoo-makefile.patch; # also contains the freetype patch diff --git a/pkgs/tools/misc/usbmuxd/default.nix b/pkgs/tools/misc/usbmuxd/default.nix index c4b412493558..b95dfde98500 100644 --- a/pkgs/tools/misc/usbmuxd/default.nix +++ b/pkgs/tools/misc/usbmuxd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "09swwr6x46qxmwylrylnyqh4pznr0swla9gijggwxxw8dw82r840"; }; - buildNativeInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ]; propagatedBuildInputs = [ libusb1 libplist ]; patchPhase = diff --git a/pkgs/tools/misc/xburst-tools/default.nix b/pkgs/tools/misc/xburst-tools/default.nix index 563406e430b8..cc9f98a94f60 100644 --- a/pkgs/tools/misc/xburst-tools/default.nix +++ b/pkgs/tools/misc/xburst-tools/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { # Not to strip cross build binaries (this is for the gcc-cross-wrapper) dontCrossStrip = true; - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libusb libusb1 autoconf automake confuse ] ++ stdenv.lib.optional (gccCross != null) gccCross; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 028b672380cf..c6e7ccd1fa2d 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ${if linkStatic then "--enable-static --disable-shared" else ""} ''; - dontDisableStatic = if linkStatic then true else false; + dontDisableStatic = linkStatic; CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else ""; LDFLAGS = if linkStatic then "-static" else ""; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # We should refer to the cross built openssl # For the 'urandom', maybe it should be a cross-system option configureFlags = '' - ${if sslSupport then "--with-ssl=${openssl.hostDrv}" else "--without-ssl"} + ${if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl"} ${if linkStatic then "--enable-static --disable-shared" else ""} --with-random /dev/urandom ''; diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix index 6734465dbba5..24d73ff4d6fe 100644 --- a/pkgs/tools/networking/inetutils/default.nix +++ b/pkgs/tools/networking/inetutils/default.nix @@ -1,18 +1,26 @@ { stdenv, fetchurl, ncurses }: stdenv.mkDerivation rec { - name = "inetutils-1.8"; + name = "inetutils-1.9.1"; src = fetchurl { url = "mirror://gnu/inetutils/${name}.tar.gz"; - sha256 = "1iqihfv54nzjmclivys2dpcyfhavgynj8pp6r44a97jbw2p0nl68"; + sha256 = "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82"; }; buildInputs = [ ncurses /* for `talk' */ ]; configureFlags = "--with-ncurses-include-dir=${ncurses}/include"; - doCheck = true; + preConfigure = '' + # Fix for building on Glibc 2.16. Won't be needed once the + # gnulib in inetutils is updated. + sed -i '/gets is a security hole/d' lib/stdio.in.h + ''; + + # Test fails with "UNIX socket name too long", probably because our + # $TMPDIR is too long. + #doCheck = true; postInstall = '' # XXX: These programs are normally installed setuid but since it diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix index d3198cee32c7..bfa673eff09f 100644 --- a/pkgs/tools/networking/modemmanager/default.nix +++ b/pkgs/tools/networking/modemmanager/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1fdf5d5cc494825afe9f551248e00a2d91e220e88435b47f109ca2a707a40f1f"; }; - buildNativeInputs = [ intltool pkgconfig ]; + nativeBuildInputs = [ intltool pkgconfig ]; buildInputs = [ udev polkit dbus_glib ppp ]; diff --git a/pkgs/tools/networking/network-manager-applet/default.nix b/pkgs/tools/networking/network-manager-applet/default.nix index 1a9b94857495..e6ef30930541 100644 --- a/pkgs/tools/networking/network-manager-applet/default.nix +++ b/pkgs/tools/networking/network-manager-applet/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { polkit isocodes ]; - buildNativeInputs = [ intltool pkgconfig ]; + nativeBuildInputs = [ intltool pkgconfig ]; makeFlags = [ ''CFLAGS=-DMOBILE_BROADBAND_PROVIDER_INFO=\"${mobile_broadband_provider_info}/share/mobile-broadband-provider-info/serviceproviders.xml\"'' diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix index 0adb9b1e5797..2a86d416e166 100644 --- a/pkgs/tools/networking/network-manager/default.nix +++ b/pkgs/tools/networking/network-manager/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ dbus_glib gnutls libgcrypt ]; - buildNativeInputs = [ intltool pkgconfig ]; + nativeBuildInputs = [ intltool pkgconfig ]; patches = [ ( substituteAll { diff --git a/pkgs/tools/networking/network-manager/pptp.nix b/pkgs/tools/networking/network-manager/pptp.nix index 8d2acfe9b316..b71e41c8b56a 100644 --- a/pkgs/tools/networking/network-manager/pptp.nix +++ b/pkgs/tools/networking/network-manager/pptp.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ networkmanager pptp ppp ] ++ stdenv.lib.optionals withGnome [ gtk libgnome_keyring ]; - buildNativeInputs = [ intltool pkgconfig ]; + nativeBuildInputs = [ intltool pkgconfig ]; configureFlags = if withGnome then "--with-gnome --with-gtkver=2" else "--without-gnome"; diff --git a/pkgs/tools/networking/networkmanagement/default.nix b/pkgs/tools/networking/networkmanagement/default.nix index 1919186586a6..474a46387588 100644 --- a/pkgs/tools/networking/networkmanagement/default.nix +++ b/pkgs/tools/networking/networkmanagement/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { }; buildInputs = [ kdelibs kde_workspace networkmanager ]; - buildNativeInputs = [ gettext pkgconfig ]; + nativeBuildInputs = [ gettext pkgconfig ]; NIX_CFLAGS_COMPILE="-I${kde_workspace}/include/solid/control"; diff --git a/pkgs/tools/networking/ntop/default.nix b/pkgs/tools/networking/ntop/default.nix index 945effabcfbd..48f2c9f08938 100644 --- a/pkgs/tools/networking/ntop/default.nix +++ b/pkgs/tools/networking/ntop/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { cp ${libtool}/share/aclocal/libtool.m4 libtool.m4.in ''; - buildNativeInputs = [ autoconf automake libtool wget libpcap gdbm zlib openssl rrdtool + nativeBuildInputs = [ autoconf automake libtool wget libpcap gdbm zlib openssl rrdtool python geoip ]; meta = { diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index c1504697a186..d50811febbb5 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -28,7 +28,6 @@ stdenv.mkDerivation rec { patches = [ ./locale_archive.patch ]; - buildNativeInptus = [ perl ]; buildInputs = [ zlib openssl libedit pkgconfig pam ]; # I set --disable-strip because later we strip anyway. And it fails to strip diff --git a/pkgs/tools/networking/pptp/default.nix b/pkgs/tools/networking/pptp/default.nix index 88f1a86a2edc..5bfb6f58bea2 100644 --- a/pkgs/tools/networking/pptp/default.nix +++ b/pkgs/tools/networking/pptp/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { MANDIR=$out/share/man/man8 PPPDIR=$out/etc/ppp ) ''; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; meta = { description = "PPTP client for Linux"; diff --git a/pkgs/tools/networking/surfraw/default.nix b/pkgs/tools/networking/surfraw/default.nix index 6fcc031aab4b..bd3a1135a845 100644 --- a/pkgs/tools/networking/surfraw/default.nix +++ b/pkgs/tools/networking/surfraw/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { "--disable-opensearch" ]; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; meta = { description = "Provides a fast unix command line interface to a variety of popular WWW search engines and other artifacts of power"; diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index 799c5e9dd85d..f52b344aeac8 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, gettext, perl, LWP, gnutls ? null }: stdenv.mkDerivation rec { - name = "wget-1.13.4"; + name = "wget-1.14"; src = fetchurl { url = "mirror://gnu/wget/${name}.tar.gz"; - sha256 = "1kadjg63x1mm741dxdidwsn1rz0f7dkzbq59v0iww87jr45p3ir4"; + sha256 = "0sf26vlklxx20fjnj30fx6rijpcyvdl6cjmh6m2bjnvn7a78k9pk"; }; preConfigure = stdenv.lib.optionalString doCheck @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { done ''; - buildNativeInputs = [ gettext ]; + nativeBuildInputs = [ gettext ]; buildInputs = stdenv.lib.optionals doCheck [ perl LWP ] ++ stdenv.lib.optional (gnutls != null) gnutls; diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 5448c9f5ba38..97ef421c341b 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "32cba96df0e02d6627f5625a441fdd4ea0db718dd5bfd50044cdfd3c606d4852"; }; - buildNativeInputs = [ perl pkgconfig ]; + nativeBuildInputs = [ perl pkgconfig ]; buildInputs = [ curl openssl boehmgc sqlite ]; @@ -43,8 +43,8 @@ stdenv.mkDerivation rec { crossAttrs = { postUnpack = - '' export CPATH="${bzip2.hostDrv}/include" - export NIX_CROSS_LDFLAGS="-L${bzip2.hostDrv}/lib -rpath-link ${bzip2.hostDrv}/lib $NIX_CROSS_LDFLAGS" + '' export CPATH="${bzip2.crossDrv}/include" + export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS" ''; configureFlags = diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 30e52da86389..2b961e5a7f22 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "b767c2b75a0036edfc6be209dcaab23643887b192e3788640380ac27298b08d0"; }; - buildNativeInputs = [ perl pkgconfig ]; + nativeBuildInputs = [ perl pkgconfig ]; buildInputs = [ curl openssl boehmgc sqlite ]; @@ -39,8 +39,8 @@ stdenv.mkDerivation rec { crossAttrs = { postUnpack = - '' export CPATH="${bzip2.hostDrv}/include" - export NIX_CROSS_LDFLAGS="-L${bzip2.hostDrv}/lib -rpath-link ${bzip2.hostDrv}/lib $NIX_CROSS_LDFLAGS" + '' export CPATH="${bzip2.crossDrv}/include" + export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS" ''; configureFlags = diff --git a/pkgs/tools/security/ccrypt/default.nix b/pkgs/tools/security/ccrypt/default.nix index a134f45c988e..5653af424d1e 100644 --- a/pkgs/tools/security/ccrypt/default.nix +++ b/pkgs/tools/security/ccrypt/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "1bzbfq19jnnlp221kilzxpy0l6w3hk9b1iqjz4haypzlyxswnf35"; }; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; meta = { homepage = http://ccrypt.sourceforge.net/; diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index 28a673d03eff..a6f8b2dc0646 100644 --- a/pkgs/tools/security/pcsclite/default.nix +++ b/pkgs/tools/security/pcsclite/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ udev dbus_libs ]; - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; meta = { description = "Middleware to access a smart card using SCard API (PC/SC)"; diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index ba4ce8a3e220..543c5d81ba1a 100644 --- a/pkgs/tools/security/pinentry/default.nix +++ b/pkgs/tools/security/pinentry/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ++ (if useGtk then ["--enable-pinentry-gtk2"] else ["--disable-pinentry-gtk"]) ++ (if useQt4 then ["--enable-pinentry-qt4"] else ["--disable-pinentry-qt4"]); - buildNativeInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; meta = { homepage = "http://gnupg.org/aegypten2/"; diff --git a/pkgs/tools/security/polkit-gnome/default.nix b/pkgs/tools/security/polkit-gnome/default.nix index b70aa427031e..c06aac204a1c 100644 --- a/pkgs/tools/security/polkit-gnome/default.nix +++ b/pkgs/tools/security/polkit-gnome/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [ polkit gtk3 ]; - buildNativeInputs = [ pkgconfig intltool ]; + nativeBuildInputs = [ pkgconfig intltool ]; configureFlags = "--disable-introspection"; diff --git a/pkgs/tools/security/polkit-kde-agent/default.nix b/pkgs/tools/security/polkit-kde-agent/default.nix index 10836366b187..7696ee93bce0 100644 --- a/pkgs/tools/security/polkit-kde-agent/default.nix +++ b/pkgs/tools/security/polkit-kde-agent/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ kdelibs polkit_qt_1 ]; - buildNativeInputs = [ gettext ]; + nativeBuildInputs = [ gettext ]; patchPhase = "sed -e s/KDE4_AUTOSTART/AUTOSTART/ -i CMakeLists.txt"; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 086a44675a9a..fc4293ad7cff 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -1,28 +1,20 @@ -{stdenv, fetchurl, coreutils ? null}: +{ stdenv, fetchurl, coreutils ? null }: -stdenv.mkDerivation ({ +stdenv.mkDerivation { name = "diffutils-3.2"; - + src = fetchurl { url = mirror://gnu/diffutils/diffutils-3.2.tar.gz; sha256 = "1lsf0ln0h3mnm2y0mwgrfk0lyfi7bnm4r886acvdrrsvc7pypaia"; }; - + + patches = [ ./gets-undeclared.patch ]; + /* If no explicit coreutils is given, use the one from stdenv. */ - buildNativeInputs = [coreutils]; + nativeBuildInputs = [ coreutils ]; meta = { homepage = http://www.gnu.org/software/diffutils/diffutils.html; description = "Commands for showing the differences between files (diff, cmp, etc.)"; }; } - -// - -{ - crossAttrs = - # XXX: Temporary workaround to allow GNU/Hurd builds with newer libcs. - (stdenv.lib.optionalAttrs (stdenv.cross.config == "i586-pc-gnu") { - patches = [ ../../misc/coreutils/gets-undeclared.patch ]; - }); -}) diff --git a/pkgs/tools/text/diffutils/gets-undeclared.patch b/pkgs/tools/text/diffutils/gets-undeclared.patch new file mode 100644 index 000000000000..b6cdc77caa84 --- /dev/null +++ b/pkgs/tools/text/diffutils/gets-undeclared.patch @@ -0,0 +1,71 @@ +This patch is needed to allow builds with newer versions of +the GNU libc (2.16+). + + +commit 66712c23388e93e5c518ebc8515140fa0c807348 +Author: Eric Blake <eblake@redhat.com> +Date: Thu Mar 29 13:30:41 2012 -0600 + + stdio: don't assume gets any more + + Gnulib intentionally does not have a gets module, and now that C11 + and glibc have dropped it, we should be more proactive about warning + any user on a platform that still has a declaration of this dangerous + interface. + + * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets + support. + * modules/stdio (Makefile.am): Likewise. + * lib/stdio-read.c (gets): Likewise. + * tests/test-stdio-c++.cc: Likewise. + * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment. + * lib/stdio.in.h (gets): Make warning occur in more places. + * doc/posix-functions/gets.texi (gets): Update documentation. + Reported by Christer Solskogen. + + Signed-off-by: Eric Blake <eblake@redhat.com> + +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index aa7b599..c377b6e 100644 +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " + # endif + #endif + +-#if @GNULIB_GETS@ +-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +-# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +-# undef gets +-# define gets rpl_gets +-# endif +-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (gets, char *, (char *s)); +-# else +-_GL_CXXALIAS_SYS (gets, char *, (char *s)); +-# undef gets +-# endif +-_GL_CXXALIASWARN (gets); + /* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning. Assume it is +- always declared, since it is required by C89. */ ++ so any use of gets warrants an unconditional warning; besides, C11 ++ removed it. */ ++#undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + +@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " + # endif + #endif + +-/* Some people would argue that sprintf should be handled like gets +- (for example, OpenBSD issues a link warning for both functions), +- since both can cause security holes due to buffer overruns. ++/* Some people would argue that all sprintf uses should be warned about ++ (for example, OpenBSD issues a link warning for it), ++ since it can cause security holes due to buffer overruns. + However, we believe that sprintf can be used safely, and is more + efficient than snprintf in those safe cases; and as proof of our + belief, we use sprintf in several gnulib modules. So this header diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index bb6e4e20d244..29b3936a0ba9 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,14 +1,16 @@ { stdenv, fetchurl, libsigsegv }: -stdenv.mkDerivation (rec { - name = "gawk-4.0.0"; +stdenv.mkDerivation rec { + name = "gawk-4.0.2"; src = fetchurl { - url = "mirror://gnu/gawk/${name}.tar.bz2"; - sha256 = "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"; + url = "mirror://gnu/gawk/${name}.tar.xz"; + sha256 = "04vd0axif762mf781pj3days6ilv2333b9zi9c50y5mma66g5q91"; }; - doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 + patches = stdenv.lib.optional stdenv.isCygwin [ ./cygwin-identifiers.patch ]; + + doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 buildInputs = [ libsigsegv ]; @@ -37,9 +39,3 @@ stdenv.mkDerivation (rec { maintainers = [ stdenv.lib.maintainers.ludo ]; }; } - -// - -stdenv.lib.optionalAttrs stdenv.isCygwin { - patches = [ ./cygwin-identifiers.patch ]; -}) diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 8368edef6563..98a737339d27 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -1,19 +1,21 @@ { stdenv, fetchurl, pcre, libiconv ? null }: -let version = "2.10"; in +let version = "2.14"; in -stdenv.mkDerivation ({ +stdenv.mkDerivation { name = "gnugrep-${version}"; src = fetchurl { url = "mirror://gnu/grep/grep-${version}.tar.xz"; - sha256 = "1cvsqyfzk1p38fcaav22dn76fkd02g7bjnqna6vrpk9vy9rnfybc"; + sha256 = "1qbjb1l7f9blckc5pqy8jlf6482hpx4awn2acmhyf5mv9wfq03p7"; }; buildInputs = [ pcre ] - ++ (stdenv.lib.optional (libiconv != null) libiconv); + ++ stdenv.lib.optional (libiconv != null) libiconv; - doCheck = if stdenv.isDarwin then false else true; + NIX_LDFLAGS = stdenv.lib.optionalString (libiconv != null) "-L${libiconv}/lib -liconv"; + + doCheck = !stdenv.isDarwin; # On Mac OS X, force use of mkdir -p, since Grep's fallback # (./install-sh) is broken. @@ -38,4 +40,4 @@ stdenv.mkDerivation ({ }; passthru = {inherit pcre;}; -} // (if libiconv != null then { NIX_LDFLAGS="-L${libiconv}/lib -liconv"; } else {}) ) +} diff --git a/pkgs/tools/text/gnupatch/darwin-fix.patch b/pkgs/tools/text/gnupatch/darwin-fix.patch deleted file mode 100644 index 50d085348148..000000000000 --- a/pkgs/tools/text/gnupatch/darwin-fix.patch +++ /dev/null @@ -1,60 +0,0 @@ -Fix builds on Darwin: -http://lists.gnu.org/archive/html/bug-patch/2010-01/msg00004.html . - - -commit 2c4e3ecddec8a686bd50d238f4cefebb950298b7 -Author: Andreas Gruenbacher <agruen@suse.de> -Date: Fri Jan 1 15:58:15 2010 +0100 - - * Makefile.in (LIBSRCS, LIBM4FILES): Add the missing files strnlen.c, - strnlen.m4, and safe-read.m4. - -diff --git a/Makefile.in b/Makefile.in -index 3b3d78a..26dc281 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -91,6 +91,7 @@ LIBSRCS = \ - gl/lib/stripslash.c \ - gl/lib/strncasecmp.c \ - gl/lib/strndup.c \ -+ gl/lib/strnlen.c \ - gl/lib/xmalloc.c \ - gl/lib/xstrndup.c - - -Add the missing bits from Gnulib. - ---- /dev/null 2012-04-23 08:54:35.747205543 +0200 -+++ b/gl/lib/strnlen.c 2012-01-16 22:35:02.000000000 +0100 -@@ -0,0 +1,31 @@ -+/* Find the length of STRING, but scan at most MAXLEN characters. -+ Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. -+ Written by Simon Josefsson. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+#include <config.h> -+ -+#include <string.h> -+ -+/* Find the length of STRING, but scan at most MAXLEN characters. -+ If no '\0' terminator is found in that many characters, return MAXLEN. */ -+ -+size_t -+strnlen (const char *string, size_t maxlen) -+{ -+ const char *end = memchr (string, '\0', maxlen); -+ return end ? (size_t) (end - string) : maxlen; -+} diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index a7a166c95c3b..c8c336ad202c 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -1,20 +1,21 @@ { stdenv, fetchurl, ed }: -stdenv.mkDerivation (rec { - name = "patch-2.6.1"; +stdenv.mkDerivation rec { + name = "patch-2.7.1"; src = fetchurl { url = "mirror://gnu/patch/${name}.tar.gz"; - sha256 = "1fc1jyq80nswkf492fiqdbl2bhvlw2wb44ghqlfd3zngx4qkfmni"; + sha256 = "1m9r83b5c154xnxbvgjg4lfff58xjapanj6dmmivqx1liik2hpy0"; }; - buildInputs = (stdenv.lib.optional doCheck ed); + buildInputs = stdenv.lib.optional doCheck ed; crossAttrs = { configureFlags = [ "ac_cv_func_strnlen_working=yes" ]; }; - doCheck = true; + # Tests fail on FreeBSD due to a Bashism in the tests. + doCheck = !stdenv.isFreeBSD; meta = { description = "GNU Patch, a program to apply differences to files"; @@ -33,9 +34,3 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; } - -// - -(stdenv.lib.optionalAttrs stdenv.isDarwin { - patches = [ ./darwin-fix.patch ]; -})) diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 243fe8dcab81..3cf5dcfca7b3 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ ghostscript ]; - buildNativeInputs = [ perl ]; + nativeBuildInputs = [ perl ]; doCheck = true; diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix index d8807bda08bc..fc8813e7cec7 100644 --- a/pkgs/tools/text/kdiff3/default.nix +++ b/pkgs/tools/text/kdiff3/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ kdelibs ]; - buildNativeInputs = [ cmake gettext ]; + nativeBuildInputs = [ cmake gettext ]; meta = { homepage = http://kdiff3.sourceforge.net/; |