From a70180ba73553e66d4f5555d2b4d232b4990718b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 30 Aug 2014 08:27:43 +0200 Subject: [PATCH] mutiout: make it builtin --- pkgs/development/compilers/gcc/4.6/default.nix | 2 +- pkgs/development/compilers/gcc/4.8/default.nix | 2 +- .../interpreters/perl/5.16/default.nix | 2 +- pkgs/development/libraries/acl/default.nix | 2 +- pkgs/development/libraries/attr/default.nix | 1 - pkgs/development/libraries/freetype/default.nix | 2 +- pkgs/development/libraries/glibc/2.19/common.nix | 2 +- pkgs/development/libraries/gmp/5.1.x.nix | 1 - pkgs/development/libraries/libffi/default.nix | 2 +- .../libraries/libjpeg-turbo/default.nix | 2 +- pkgs/development/libraries/libpng/default.nix | 1 - pkgs/development/libraries/libtiff/default.nix | 1 - pkgs/development/libraries/libvorbis/default.nix | 2 +- pkgs/development/libraries/mpfr/default.nix | 2 +- pkgs/development/libraries/openssl/default.nix | 2 +- pkgs/development/libraries/pcre/default.nix | 1 - pkgs/development/libraries/zlib/default.nix | 1 - pkgs/development/tools/misc/binutils/default.nix | 2 +- pkgs/development/tools/misc/libtool/libtool2.nix | 1 - pkgs/os-specific/linux/libcap/default.nix | 1 - pkgs/os-specific/linux/pam/default.nix | 2 +- pkgs/servers/x11/xorg/overrides.nix | 16 +--------------- pkgs/stdenv/generic/default.nix | 7 +------ pkgs/tools/archivers/gnutar/default.nix | 2 +- pkgs/tools/compression/xz/default.nix | 1 - pkgs/tools/misc/coreutils/default.nix | 1 - pkgs/tools/misc/findutils/default.nix | 1 - pkgs/tools/text/diffutils/default.nix | 1 - pkgs/tools/text/gawk/default.nix | 1 - pkgs/tools/text/gnugrep/default.nix | 2 +- pkgs/tools/text/gnused/default.nix | 1 - 31 files changed, 17 insertions(+), 50 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 5403b7c77a11..a9ce5648789a 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -262,7 +262,7 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ stdenv.hookLib.multiout gmp mpfr mpc libelf ] + buildInputs = [ gmp mpfr mpc libelf ] ++ (optional (ppl != null) ppl) ++ (optional (cloog != null) cloog) ++ (optional (zlib != null) zlib) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index e7f28bb4f073..fbd5f4332de1 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -282,7 +282,7 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ stdenv.hookLib.multiout gmp mpfr mpc libelf ] + buildInputs = [ gmp mpfr mpc libelf ] ++ (optional (ppl != null) ppl) ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index bf0f2b91482c..45a11f01a399 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # TODO: Add a "dev" output containing the header files. outputs = [ "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ]; + setOutputFlags = false; setOutputConfigureFlags = false; diff --git a/pkgs/development/libraries/acl/default.nix b/pkgs/development/libraries/acl/default.nix index 70e4ef9b8107..4055708907b9 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "bin" "doc" ]; nativeBuildInputs = [ gettext ]; - buildInputs = [ stdenv.hookLib.multiout attr ]; + buildInputs = [ attr ]; # Upstream use C++-style comments in C code. Remove them. # This comment breaks compilation if too strict gcc flags are used. diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 25b6ffd56c65..e4e9142b6328 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -9,7 +9,6 @@ stdenv.mkDerivation rec { }; outputs = [ "dev" "out" "bin" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ]; nativeBuildInputs = [ gettext ]; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index aa20a6997867..5647f3114549 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence - buildInputs = [ stdenv.hookLib.multiout pkgconfig which ] + buildInputs = [ pkgconfig which ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; diff --git a/pkgs/development/libraries/glibc/2.19/common.nix b/pkgs/development/libraries/glibc/2.19/common.nix index 78f4131b76a1..3611b9b4b3c9 100644 --- a/pkgs/development/libraries/glibc/2.19/common.nix +++ b/pkgs/development/libraries/glibc/2.19/common.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation ({ outputs = [ "out" "dev" "bin" "static" ]; - buildInputs = [ stdenv.hookLib.multiout ] + buildInputs = [ ] ++ stdenv.lib.optionals (cross != null) [ gccCross ] ++ stdenv.lib.optional (mig != null) mig ++ stdenv.lib.optionals withGd [ gd libpng ]; diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 778b5144f291..79b29ee3f038 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -11,7 +11,6 @@ stdenv.mkDerivation rec { }; outputs = [ "out" "info" ]; - buildInputs = [ stdenv.hookLib.multiout ]; nativeBuildInputs = [ m4 ]; diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index f62dff58968f..daff1aa471c7 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ] + buildInputs = [ ] ++ stdenv.lib.optional doCheck dejagnu; configureFlags = [ diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index a27d5af6f8df..84732670eef5 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" "bin" ]; - buildInputs = [ stdenv.hookLib.multiout autoreconfHook nasm ]; + buildInputs = [ autoreconfHook nasm ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index 7014c7686188..0056212dfbb4 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -21,7 +21,6 @@ in stdenv.mkDerivation rec { postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ]; propagatedBuildInputs = [ zlib ]; diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 55db7692ffd1..681d3d97af59 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -33,7 +33,6 @@ stdenv.mkDerivation rec { ''; # ^ sh on darwin seems not to expand globs in redirects, and I don't want to rebuild all again elsewhere outputs = [ "dev" "out" "bin" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/libvorbis/default.nix b/pkgs/development/libraries/libvorbis/default.nix index 6bdf10765deb..940e5a5685c3 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout pkgconfig ]; + buildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libogg ]; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index 07ab3187f8cf..1d62dfff3c99 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout gmp ]; + buildInputs = [ gmp ]; configureFlags = /* Work around a FreeBSD bug that otherwise leads to segfaults in the test suite: diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index babf49274607..e2a5eec77dba 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "man" "bin" ]; setOutputFlags = false; - buildInputs = [ stdenv.hookLib.multiout ] + buildInputs = [ ] ++ stdenv.lib.optional withCryptodev cryptodevHeaders; nativeBuildInputs = [ perl ]; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index ae3f21367045..961a9e7b9ea6 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -13,7 +13,6 @@ stdenv.mkDerivation rec { }; outputs = [ "dev" "out" "bin" "doc" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ]; # The compiler on Darwin crashes with an internal error while building the # C++ interface. Disabling optimizations on that platform remedies the diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 5f9a01208d84..3db3ad449c15 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -14,7 +14,6 @@ stdenv.mkDerivation rec { }; outputs = [ "dev" "out" "static" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ]; setOutputFlags = false; configureFlags = stdenv.lib.optional (!static) "--shared"; diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 30ea323908fa..005b493836f1 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "info" ]; buildInputs = - [ stdenv.hookLib.multiout zlib ] + [ zlib ] ++ optional gold bison; inherit noSysDirs; diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix index df52596c5a55..924113ea5486 100644 --- a/pkgs/development/tools/misc/libtool/libtool2.nix +++ b/pkgs/development/tools/misc/libtool/libtool2.nix @@ -9,7 +9,6 @@ stdenv.mkDerivation rec { }; outputs = [ "out" "lib" ]; - buildInputs = [ stdenv.hookLib.multiout ]; nativeBuildInputs = [ lzma m4 perl ]; diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index 1b5d617357bb..34d855da6f56 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { }; outputs = [ "dev" "out" ]; - buildInputs = [ stdenv.hookLib.multiout ]; nativeBuildInputs = [ perl ]; propagatedBuildInputs = [ attr ]; diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 39596c7e0326..8423ea6f1236 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex ]; - buildInputs = [ stdenv.hookLib.multiout cracklib ]; + buildInputs = [ cracklib ]; enableParallelBuilding = true; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index e93e0348b867..879d2a06e420 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -56,7 +56,7 @@ in }; libxcb = attrs : attrs // { - nativeBuildInputs = [ stdenv.hookLib.multiout args.python ]; + nativeBuildInputs = [ args.python ]; configureFlags = "--enable-xkb"; outputs = [ "dev" "out" "doc" "man" ]; }; @@ -71,7 +71,6 @@ in libX11 = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; preConfigure = setMalloc0ReturnsNullCrossCompiling; postInstall = '' @@ -82,12 +81,10 @@ in libXau = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXdmcp = attrs: attrs // { outputs = [ "dev" "out" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXfont = attrs: attrs // { @@ -101,7 +98,6 @@ in libXxf86vm = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; preConfigure = setMalloc0ReturnsNullCrossCompiling; }; @@ -125,7 +121,6 @@ in libXcomposite = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; propagatedBuildInputs = [ xorg.libXfixes ]; }; @@ -135,17 +130,14 @@ in libXcursor = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXdamage = attrs: attrs // { outputs = [ "dev" "out" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXft = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; propagatedBuildInputs = [ xorg.libXrender args.freetype args.fontconfig ]; preConfigure = setMalloc0ReturnsNullCrossCompiling; # the include files need ft2build.h, and Requires.private isn't enough for us @@ -156,29 +148,24 @@ in libXext = attrs: attrs // { outputs = [ "dev" "out" "man" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; propagatedBuildInputs = [ xorg.xproto xorg.libXau ]; preConfigure = setMalloc0ReturnsNullCrossCompiling; }; libXfixes = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXi = attrs: attrs // { outputs = [ "dev" "out" "man" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXinerama = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; }; libXrandr = attrs: attrs // { outputs = [ "dev" "out" "man" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; preConfigure = setMalloc0ReturnsNullCrossCompiling; propagatedBuildInputs = [xorg.libXrender]; }; @@ -188,7 +175,6 @@ in libXrender = attrs: attrs // { outputs = [ "dev" "out" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ] ++ attrs.buildInputs; preConfigure = setMalloc0ReturnsNullCrossCompiling; }; diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 118331feff6f..789bfe87f625 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -44,6 +44,7 @@ let ../../build-support/setup-hooks/compress-man-pages.sh ../../build-support/setup-hooks/strip.sh ../../build-support/setup-hooks/patch-shebangs.sh + ../../build-support/setup-hooks/multiple-outputs.sh gcc ]; @@ -206,12 +207,6 @@ let inherit overrides; inherit gcc; - - # extra useful hooks, so we do not need to pass them as package arguments - hookLib = { - multiout = ../../build-support/setup-hooks/multiple-outputs.sh; #ToDo: propagated-native-build-inputs - #ToDo: add also autoreconf = pkgs.autoreconfHook - }; } # Propagate any extra attributes. For instance, we use this to diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 140294d987d5..23d3f1dd28b4 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; outputs = [ "out" "info" ]; - buildInputs = [ stdenv.hookLib.multiout acl ]; + buildInputs = [ acl ]; # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index aca5995c3bae..5889bdd5093d 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -9,7 +9,6 @@ stdenv.mkDerivation rec { }; outputs = [ "dev" "out" "bin" "man" "doc" ]; - buildInputs = [ stdenv.hookLib.multiout ]; doCheck = true; diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index b3433ca83ec2..47757e4659ac 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -24,7 +24,6 @@ let nativeBuildInputs = [ perl ]; buildInputs = [ gmp ] - ++ [ stdenv.hookLib.multiout ] ++ optional aclSupport acl ++ optionals selinuxSupport [ libselinux libsepol ]; diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 407470870a67..b3d1d4c9e791 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -13,7 +13,6 @@ stdenv.mkDerivation rec { patches = [ ./findutils-path.patch ./change_echo_path.patch ]; outputs = [ "out" "info" ]; - buildInputs = [ stdenv.hookLib.multiout ]; doCheck = true; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 9275603bad4c..680a75445ef0 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -9,7 +9,6 @@ stdenv.mkDerivation rec { }; outputs = [ "out" "info" ]; - buildInputs = [ stdenv.hookLib.multiout ]; /* If no explicit coreutils is given, use the one from stdenv. */ nativeBuildInputs = [ coreutils ]; diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 432d7b587120..f5fbf029aad0 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { #outputs = stdenv.lib.optionals (!interactive) [ "out" "doc" ]; #ToDo buildInputs = [ libsigsegv ] - ++ optional (!interactive) stdenv.hookLib.multiout ++ optional interactive readline; configureFlags = [ "--with-libsigsegv-prefix=${libsigsegv}" ] diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index e2a48085db96..d0c5b8dbd215 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { #outputs = [ "out" "doc" ]; ToDo - buildInputs = [ stdenv.hookLib.multiout pcre ] + buildInputs = [ pcre ] ++ stdenv.lib.optional (libiconv != null) libiconv; patches = [ ./test-localeconv.patch ]; diff --git a/pkgs/tools/text/gnused/default.nix b/pkgs/tools/text/gnused/default.nix index 49ff76b85c20..037c2f17a63b 100644 --- a/pkgs/tools/text/gnused/default.nix +++ b/pkgs/tools/text/gnused/default.nix @@ -9,7 +9,6 @@ stdenv.mkDerivation { }; outputs = [ "out" "info" ]; - buildInputs = [ stdenv.hookLib.multiout ]; meta = { homepage = http://www.gnu.org/software/sed/;