diff options
Diffstat (limited to 'pkgs/development')
78 files changed, 389 insertions, 163 deletions
diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh index de4566c12dd..cc58162deef 100644 --- a/pkgs/development/compilers/gcc/4.6/builder.sh +++ b/pkgs/development/compilers/gcc/4.6/builder.sh @@ -8,9 +8,10 @@ mkdir $NIX_FIXINC_DUMMY if test "$staticCompiler" = "1"; then EXTRA_LDFLAGS="-static" else - EXTRA_LDFLAGS="" + EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib" fi + # GCC interprets empty paths as ".", which we don't want. if test -z "$CPATH"; then unset CPATH; fi if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi @@ -29,7 +30,7 @@ if test "$noSysDirs" = "1"; then # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). - export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include + export NIX_FIXINC_DUMMY=$libc_dev/include # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib" @@ -50,10 +51,10 @@ if test "$noSysDirs" = "1"; then # bootstrap compiler are optimized and (optionally) contain # debugging information (info "(gccinstall) Building"). if test -n "$dontStrip"; then - extraFlags="-O2 -g $extraFlags" + extraFlags="-O2 -g $extraFlags" else - # Don't pass `-g' at all; this saves space while building. - extraFlags="-O2 $extraFlags" + # Don't pass `-g' at all; this saves space while building. + extraFlags="-O2 $extraFlags" fi EXTRA_FLAGS="$extraFlags" @@ -170,9 +171,8 @@ preConfigure() { # Patch the configure script so it finds glibc headers. It's # important for example in order not to get libssp built, # because its functionality is in glibc already. - glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include" sed -i \ - -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \ + -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \ gcc/configure fi @@ -206,6 +206,14 @@ preInstall() { postInstall() { + # Move runtime libraries to $lib. + mkdir -p $lib/lib + ln -s lib $lib/lib64 + mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ + for i in $lib/lib/*.la; do + substituteInPlace $i --replace $out $lib + done + # Remove precompiled headers for now. They are very big and # probably not very useful yet. find $out/include -name "*.gch" -exec rm -rf {} \; -prune @@ -217,6 +225,7 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug + # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out for i in $out/libexec/gcc/*/*/*; do if PREV_RPATH=`patchelf --print-rpath $i`; then @@ -225,7 +234,7 @@ postInstall() { done # Get rid of some "fixed" header files - rm -rf $out/lib/gcc/*/*/include/root + rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux} # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks. for i in $out/bin/*-gcc*; do diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 8528be07729..a9ce5648789 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -173,7 +173,7 @@ let version = "4.6.3"; "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; in @@ -185,13 +185,19 @@ stdenv.mkDerivation ({ builder = ./builder.sh; - src = (import ./sources.nix) { + srcs = (import ./sources.nix) { inherit fetchurl optional version; inherit langC langCC langFortran langJava langAda langGo; }; + outputs = [ "out" "lib" ]; + + setOutputFlags = false; + inherit patches enableMultilib; + libc_dev = stdenv.gcc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' diff --git a/pkgs/development/compilers/gcc/4.8/builder.sh b/pkgs/development/compilers/gcc/4.8/builder.sh index 3d24d34a2f2..a839f94bbd2 100644 --- a/pkgs/development/compilers/gcc/4.8/builder.sh +++ b/pkgs/development/compilers/gcc/4.8/builder.sh @@ -8,9 +8,10 @@ mkdir $NIX_FIXINC_DUMMY if test "$staticCompiler" = "1"; then EXTRA_LDFLAGS="-static" else - EXTRA_LDFLAGS="" + EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib" fi + # GCC interprets empty paths as ".", which we don't want. if test -z "$CPATH"; then unset CPATH; fi if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi @@ -29,7 +30,7 @@ if test "$noSysDirs" = "1"; then # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). - export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include + export NIX_FIXINC_DUMMY=$libc_dev/include # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib" @@ -171,9 +172,8 @@ preConfigure() { # Patch the configure script so it finds glibc headers. It's # important for example in order not to get libssp built, # because its functionality is in glibc already. - glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include" sed -i \ - -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \ + -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \ gcc/configure fi @@ -210,6 +210,14 @@ preInstall() { postInstall() { + # Move runtime libraries to $lib. + mkdir -p $lib/lib + ln -s lib $lib/lib64 + mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ + for i in $lib/lib/*.la; do + substituteInPlace $i --replace $out $lib + done + # Remove precompiled headers for now. They are very big and # probably not very useful yet. find $out/include -name "*.gch" -exec rm -rf {} \; -prune @@ -221,15 +229,23 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug + # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out - for i in $out/libexec/gcc/*/*/*; do - if PREV_RPATH=`patchelf --print-rpath $i`; then - patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i - fi + for i in "$out"/libexec/gcc/*/*/*; do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK + done + + # For some reason the libs retain RPATH to $out + for i in "$lib"/lib/{libtsan.so.0.0.0,libasan.so.0.0.0}; do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK done # Get rid of some "fixed" header files - rm -rf $out/lib/gcc/*/*/include/root + rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux} # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks. for i in $out/bin/*-gcc*; do diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index f56ee003f50..bd69476aa59 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -195,7 +195,7 @@ let version = "4.8.3"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; in @@ -214,6 +214,12 @@ stdenv.mkDerivation ({ inherit patches; + outputs = [ "out" "lib" "doc" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.gcc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' @@ -355,7 +361,7 @@ stdenv.mkDerivation ({ ) } ${if (stdenv ? glibc && cross == null) - then " --with-native-system-header-dir=${stdenv.glibc}/include" + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index d38040a48b3..ae6bf077a2a 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -344,7 +344,7 @@ stdenv.mkDerivation ({ ) } ${if (stdenv ? glibc && cross == null) - then " --with-native-system-header-dir=${stdenv.glibc}/include" + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} diff --git a/pkgs/development/interpreters/guile/setup-hook-2.0.sh b/pkgs/development/interpreters/guile/setup-hook-2.0.sh index 6994c4cd8dc..fd1dc944ed4 100644 --- a/pkgs/development/interpreters/guile/setup-hook-2.0.sh +++ b/pkgs/development/interpreters/guile/setup-hook-2.0.sh @@ -10,4 +10,4 @@ addGuileLibPath () { fi } -envHooks=(${envHooks[@]} addGuileLibPath) +envHooks+=(addGuileLibPath) diff --git a/pkgs/development/interpreters/guile/setup-hook.sh b/pkgs/development/interpreters/guile/setup-hook.sh index 87cb5118506..c1d19e579ed 100644 --- a/pkgs/development/interpreters/guile/setup-hook.sh +++ b/pkgs/development/interpreters/guile/setup-hook.sh @@ -5,4 +5,4 @@ addGuileLibPath () { fi } -envHooks=(${envHooks[@]} addGuileLibPath) +envHooks+=(addGuileLibPath) diff --git a/pkgs/development/interpreters/perl/5.14/setup-hook.sh b/pkgs/development/interpreters/perl/5.14/setup-hook.sh index 6a144a7f780..a8656b8531d 100644 --- a/pkgs/development/interpreters/perl/5.14/setup-hook.sh +++ b/pkgs/development/interpreters/perl/5.14/setup-hook.sh @@ -2,4 +2,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/lib/perl5/site_perl } -envHooks=(${envHooks[@]} addPerlLibPath) +envHooks+=(addPerlLibPath) diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index c1a5374c92e..45a11f01a39 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -18,6 +18,13 @@ stdenv.mkDerivation rec { sha256 = "1dpd9lhc4723wmsn4dsn4m320qlqgyw28bvcbhnfqp2nl3f0ikv9"; }; + # TODO: Add a "dev" output containing the header files. + outputs = [ "out" "man" ]; + + setOutputFlags = false; + + setOutputConfigureFlags = false; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch @@ -49,7 +56,7 @@ stdenv.mkDerivation rec { preConfigure = '' - configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" + configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$man/share/man/man1 -Dman3dir=$man/share/man/man3" ${optionalString stdenv.isArm '' configureFlagsArray=(-Dldflags="-lm -lrt") @@ -68,6 +75,17 @@ stdenv.mkDerivation rec { substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" ''; + postInstall = + '' + # Remove dependency between "out" and "man" outputs. + rm $out/lib/perl5/*/*/.packlist + + # Remove dependencies on glibc.dev and coreutils. + substituteInPlace $out/lib/perl5/*/*/Config_heavy.pl \ + --replace ${stdenv.glibc.dev or "/blabla"} /no-such-path \ + --replace $man /no-such-path + ''; # */ + setupHook = ./setup-hook.sh; passthru.libPrefix = "lib/perl5/site_perl"; diff --git a/pkgs/development/interpreters/perl/5.16/setup-hook.sh b/pkgs/development/interpreters/perl/5.16/setup-hook.sh index 6a144a7f780..a8656b8531d 100644 --- a/pkgs/development/interpreters/perl/5.16/setup-hook.sh +++ b/pkgs/development/interpreters/perl/5.16/setup-hook.sh @@ -2,4 +2,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/lib/perl5/site_perl } -envHooks=(${envHooks[@]} addPerlLibPath) +envHooks+=(addPerlLibPath) diff --git a/pkgs/development/interpreters/perl/5.20/setup-hook.sh b/pkgs/development/interpreters/perl/5.20/setup-hook.sh index 6a144a7f780..a8656b8531d 100644 --- a/pkgs/development/interpreters/perl/5.20/setup-hook.sh +++ b/pkgs/development/interpreters/perl/5.20/setup-hook.sh @@ -2,4 +2,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/lib/perl5/site_perl } -envHooks=(${envHooks[@]} addPerlLibPath) +envHooks+=(addPerlLibPath) diff --git a/pkgs/development/interpreters/perl/sys-perl/setup-hook.sh b/pkgs/development/interpreters/perl/sys-perl/setup-hook.sh index a46a19602e7..7b03c15ec5a 100644 --- a/pkgs/development/interpreters/perl/sys-perl/setup-hook.sh +++ b/pkgs/development/interpreters/perl/sys-perl/setup-hook.sh @@ -2,4 +2,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/@libPrefix@ } -envHooks=(${envHooks[@]} addPerlLibPath) +envHooks+=(addPerlLibPath) diff --git a/pkgs/development/interpreters/pypy/2.3/setup-hook.sh b/pkgs/development/interpreters/pypy/2.3/setup-hook.sh index 67c71bf0081..7d325828d0e 100644 --- a/pkgs/development/interpreters/pypy/2.3/setup-hook.sh +++ b/pkgs/development/interpreters/pypy/2.3/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/interpreters/python/2.6/setup-hook.sh b/pkgs/development/interpreters/python/2.6/setup-hook.sh index 290525c3571..4caff9c9d84 100644 --- a/pkgs/development/interpreters/python/2.6/setup-hook.sh +++ b/pkgs/development/interpreters/python/2.6/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/interpreters/python/2.7/setup-hook.sh b/pkgs/development/interpreters/python/2.7/setup-hook.sh index a393b70afe1..4770eea886f 100644 --- a/pkgs/development/interpreters/python/2.7/setup-hook.sh +++ b/pkgs/development/interpreters/python/2.7/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/interpreters/python/3.2/setup-hook.sh b/pkgs/development/interpreters/python/3.2/setup-hook.sh index e6fa34bf54b..e8215ef9877 100644 --- a/pkgs/development/interpreters/python/3.2/setup-hook.sh +++ b/pkgs/development/interpreters/python/3.2/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/interpreters/python/3.3/setup-hook.sh b/pkgs/development/interpreters/python/3.3/setup-hook.sh index c272c87daf1..82a8c0abd32 100644 --- a/pkgs/development/interpreters/python/3.3/setup-hook.sh +++ b/pkgs/development/interpreters/python/3.3/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/interpreters/python/3.4/setup-hook.sh b/pkgs/development/interpreters/python/3.4/setup-hook.sh index ae71b4147ab..fddcc0b73fe 100644 --- a/pkgs/development/interpreters/python/3.4/setup-hook.sh +++ b/pkgs/development/interpreters/python/3.4/setup-hook.sh @@ -12,4 +12,4 @@ toPythonPath() { echo $result } -envHooks=(${envHooks[@]} addPythonPath) +envHooks+=(addPythonPath) diff --git a/pkgs/development/libraries/acl/default.nix b/pkgs/development/libraries/acl/default.nix index d37d8926fbd..4055708907b 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + nativeBuildInputs = [ gettext ]; buildInputs = [ attr ]; diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 229529f08ce..da03ab44ecd 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -23,11 +23,13 @@ stdenv.mkDerivation rec { configureFlags = '' --with-apr=${apr} --with-expat=${expat} --with-crypto - ${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"} + ${stdenv.lib.optionalString sslSupport "--with-openssl"} ${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db}"} ${stdenv.lib.optionalString ldapSupport "--with-ldap"} ''; + buildInputs = stdenv.lib.optional sslSupport openssl; + propagatedBuildInputs = [ makeWrapper apr expat ] ++ optional sslSupport openssl ++ optional bdbSupport db diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index c2737b20eff..23ad3261fb5 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -10,6 +10,13 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin_fix_configure.patch ]; + outputs = [ "dev" "out" ]; + + preConfigure = + '' + configureFlagsArray+=("--with-installbuilddir=$dev/share/build") + ''; + configureFlags = # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 @@ -17,6 +24,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = + '' + mkdir $dev/bin $dev/lib + mv $out/bin/apr-1-config $dev/bin + mv $out/lib/pkgconfig $dev/lib + ''; + meta = { homepage = http://apr.apache.org/; description = "The Apache Portable Runtime library"; diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index ce7f92a2035..d6b080050be 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -12,6 +12,10 @@ stdenv.mkDerivation rec { sha256 = "13zijfcmx7sda83qkryzsmr9hw0r3b73xkagq9cmm733fhcl7a28"; }; + enableParallelBuilding = true; + + outputs = [ "dev" "out" "doc" ]; + buildInputs = libintlOrEmpty; nativeBuildInputs = [ pkgconfig perl ]; @@ -20,8 +24,6 @@ stdenv.mkDerivation rec { #doCheck = true; # no checks in there (2.10.0) - postInstall = "rm -rf $out/share/gtk-doc"; - meta = { description = "Accessibility toolkit"; diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 8d87e2ee50d..e4e9142b632 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + nativeBuildInputs = [ gettext ]; configureFlags = "MAKE=make MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ECHO=echo SED=sed AWK=gawk"; diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index cc047da2758..26748c5d44b 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "119x7p1cqw40mpwj80xfq879l9m1dkc7vbc1f3bz3kvkf8bf6p16"; }; + outputs = [ "dev" "out" "doc" ]; + configureFlags = "--enable-cplusplus"; doCheck = true; @@ -15,6 +17,12 @@ stdenv.mkDerivation rec { # Don't run the native `strip' when cross-compiling. dontStrip = stdenv ? cross; + postInstall = + '' + mkdir -p $out/share/doc + mv $out/share/gc $out/share/doc/gc + ''; + meta = { description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++"; diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 6c73b17e6f4..0be0d74b292 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { sha256 = "0inqwsylqkrzcjivdirkjx5nhdgxbdc62fq284c3xppinfg9a195"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + nativeBuildInputs = [ pkgconfig ] ++ libintlOrEmpty ++ libiconvOrEmpty; propagatedBuildInputs = @@ -53,12 +55,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # The default `--disable-gtk-doc' is ignored. - postInstall = "rm -rf $out/share/gtk-doc" - + stdenv.lib.optionalString stdenv.isDarwin ('' - #newline - '' + glib.flattenInclude - ); + postInstall = stdenv.lib.optionalString stdenv.isDarwin glib.flattenInclude; meta = { description = "A 2D graphics library with support for multiple output devices"; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index a13e399ab0f..5647f311454 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -32,12 +32,16 @@ stdenv.mkDerivation rec { (fetch_bohoomil "infinality-2.5.3.patch" "0mxiybcb4wwbicrjiinh1b95rv543bh05sdqk1v0ipr3fxfrb47q") ; + outputs = [ "dev" "out" ]; + propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence buildInputs = [ pkgconfig which ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; + configureFlags = "--disable-static --bindir=$(dev)/bin"; + # from Gentoo, see https://bugzilla.redhat.com/show_bug.cgi?id=506840 NIX_CFLAGS_COMPILE = "-fno-strict-aliasing"; # The asm for armel is written with the 'asm' keyword. @@ -48,8 +52,8 @@ stdenv.mkDerivation rec { doCheck = true; # compat hacks - postInstall = glib.flattenInclude + '' - ln -s . "$out"/include/freetype + postFixup = glib.flattenInclude + '' + ln -s . "$dev"/include/freetype ''; crossAttrs = { diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 27e2cad062b..fa1599562ca 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -13,8 +13,12 @@ stdenv.mkDerivation rec { sha256 = "1gpqpskp4zzf7h35bp247jcvnk6rxc52r69pb11v8g8i2q386ls8"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + setupHook = ./setup-hook.sh; + enableParallelBuilding = true; + # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. buildInputs = [ libX11 libintlOrEmpty ]; @@ -28,7 +32,11 @@ stdenv.mkDerivation rec { doCheck = true; - postInstall = "rm -rf $out/share/gtk-doc"; + # propagate the bin output + postPhases = "postPostFixup"; + postPostFixup = '' + echo -n " $bin" >> "$dev"/nix-support/propagated-*build-inputs + ''; meta = { description = "A library for image loading and manipulation"; diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 9d62472c27e..afad9e39030 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (rec { fi ''; - buildInputs = [ xz ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; + buildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 839ba7cfa95..a3c0a3a59a3 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -53,9 +53,11 @@ stdenv.mkDerivation rec { patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch; + #outputs = [ "dev" "out" "bin" ]; # ToDo: no idea what's wrong! docs? + setupHook = ./setup-hook.sh; - buildInputs = [ libelf ] + buildInputs = [ /*stdenv.hookLib.multiout*/ libelf ] ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ]; nativeBuildInputs = [ pkgconfig gettext perl python ]; @@ -99,8 +101,6 @@ stdenv.mkDerivation rec { sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c ''; - postInstall = ''rm -rvf $out/share/gtk-doc''; - passthru = { gioModuleDir = "lib/gio/modules"; inherit flattenInclude; diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index f173744e5ca..91411e68dd2 100644 --- a/pkgs/development/libraries/glib/setup-hook.sh +++ b/pkgs/development/libraries/glib/setup-hook.sh @@ -14,4 +14,19 @@ glibPreFixupPhase() { addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name" } -preFixupPhases="$preFixupPhases glibPreFixupPhase" +preFixupPhases+=(glibPreFixupPhase) + + +preFixupHooks+=(_multioutGtkDocs) + +# Move documentation to the desired outputs. +_multioutGtkDocs() { + if [ "$outputs" = "out" ]; then return; fi; + _moveToOutput share/gtk-doc "${!outputDoc}" + + # Remove empty share directory. + if [ -d "$out/share" ]; then + rmdir "$out/share" 2> /dev/null || true + fi +} + diff --git a/pkgs/development/libraries/glibc/2.19/builder.sh b/pkgs/development/libraries/glibc/2.19/builder.sh index 3b077cbb3fd..043621766c5 100644 --- a/pkgs/development/libraries/glibc/2.19/builder.sh +++ b/pkgs/development/libraries/glibc/2.19/builder.sh @@ -12,8 +12,10 @@ postConfigure() { export NIX_DONT_SET_RPATH=1 unset CFLAGS -} + # Apparently --bindir is not respected. + makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin") +} postInstall() { if test -n "$installLocales"; then @@ -27,7 +29,7 @@ postInstall() { if test -z "$hurdHeaders"; then # Include the Linux kernel headers in Glibc, except the `scsi' # subdirectory, which Glibc provides itself. - (cd $out/include && \ + (cd $dev/include && \ ln -sv $(ls -d $kernelHeaders/include/* | grep -v 'scsi$') .) fi @@ -52,6 +54,17 @@ postInstall() { # Get rid of more unnecessary stuff. rm -rf $out/var $out/sbin/sln + + # Put libraries for static linking in a separate output. Note + # that libc_nonshared.a and libpthread_nonshared.a are required + # for dynamically-linked applications. + mkdir -p $static/lib + mv $out/lib/*.a $static/lib + mv $static/lib/lib*_nonshared.a $out/lib + + # Work around a Nix bug: hard links across outputs cause a build failure. + cp $bin/bin/getconf $bin/bin/getconf_ + mv $bin/bin/getconf_ $bin/bin/getconf } genericBuild diff --git a/pkgs/development/libraries/glibc/2.19/common.nix b/pkgs/development/libraries/glibc/2.19/common.nix index a828148c3d5..8ab96f34f7d 100644 --- a/pkgs/development/libraries/glibc/2.19/common.nix +++ b/pkgs/development/libraries/glibc/2.19/common.nix @@ -107,7 +107,10 @@ stdenv.mkDerivation ({ installFlags = [ "sysconfdir=$(out)/etc" ]; - buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ] + outputs = [ "out" "dev" "bin" "static" ]; + + 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/glibc/2.19/default.nix b/pkgs/development/libraries/glibc/2.19/default.nix index 52a94bd0a0d..6cfbcd47da9 100644 --- a/pkgs/development/libraries/glibc/2.19/default.nix +++ b/pkgs/development/libraries/glibc/2.19/default.nix @@ -95,7 +95,7 @@ in # To avoid a dependency on the build system 'bash'. preFixup = '' - rm $out/bin/{ldd,tzselect,catchsegv,xtrace} + rm $bin/bin/{ldd,tzselect,catchsegv,xtrace} ''; } else {})) diff --git a/pkgs/development/libraries/glibc/2.19/locales.nix b/pkgs/development/libraries/glibc/2.19/locales.nix index 9f9fb86a396..08c791b4131 100644 --- a/pkgs/development/libraries/glibc/2.19/locales.nix +++ b/pkgs/development/libraries/glibc/2.19/locales.nix @@ -25,7 +25,7 @@ build null { # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive. buildPhase = '' - mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale" + mkdir -p $TMPDIR/"${stdenv.gcc.libc}/lib/locale" # Hack to allow building of the locales (needed since glibc-2.12) sed -i -e "s,^LOCALEDEF=.*,LOCALEDEF=localedef --prefix=$TMPDIR," -e \ diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/default.nix index a8a3943e409..144dd0d9bfb 100644 --- a/pkgs/development/libraries/gmime/default.nix +++ b/pkgs/development/libraries/gmime/default.nix @@ -8,9 +8,13 @@ stdenv.mkDerivation rec { sha256 = "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"; }; + outputs = [ "dev" "out" "doc" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib zlib libgpgerror ]; + enableParallelBuilding = true; + meta = { homepage = http://spruce.sourceforge.net/gmime/; description = "A C/C++ library for manipulating MIME messages"; diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 14a6d34d932..573b7cbe2ee 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -2,7 +2,7 @@ with { inherit (stdenv.lib) optional; }; -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "gmp-5.1.3"; src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv @@ -10,6 +10,8 @@ stdenv.mkDerivation (rec { sha256 = "0q5i39pxrasgn9qdxzpfbwhh11ph80p57x6hf48m74261d97j83m"; }; + outputs = [ "out" "info" ]; + nativeBuildInputs = [ m4 ]; configureFlags = @@ -22,6 +24,7 @@ stdenv.mkDerivation (rec { ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" ++ optional stdenv.is64bit "--with-pic" ; + dontDisableStatic = withStatic; doCheck = true; @@ -58,6 +61,4 @@ stdenv.mkDerivation (rec { maintainers = [ maintainers.simons ]; }; } - // stdenv.lib.optionalAttrs withStatic { dontDisableStatic = true; } -) diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 4b7ec1f4116..5fdd88ff0b1 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { sha256 = "162flbzwzz0b8axab2gimc4dglpaw88fh1d177zfg0whczlpbsln"; }; + outputs = [ "dev" "out" "doc" ]; + buildInputs = [ flex bison glib pkgconfig python ] ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isDarwin otool; @@ -25,8 +27,6 @@ stdenv.mkDerivation rec { # other dependencies). configureFlags = [ "--disable-tests" ]; - postInstall = "rm -rf $out/share/gtk-doc"; - setupHook = ./setup-hook.sh; patches = [ ./absolute_shlib_path.patch ]; diff --git a/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/pkgs/development/libraries/gstreamer/core/setup-hook.sh index 04863ab3b61..3dd7812ece6 100644 --- a/pkgs/development/libraries/gstreamer/core/setup-hook.sh +++ b/pkgs/development/libraries/gstreamer/core/setup-hook.sh @@ -5,5 +5,5 @@ addGstreamer1LibPath () { fi } -envHooks=(${envHooks[@]} addGstreamer1LibPath) +envHooks+=(addGstreamer1LibPath) diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh index 10671f9d227..e89aeda5bc1 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh +++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh @@ -5,4 +5,4 @@ addGstreamerLibPath () { fi } -envHooks=(${envHooks[@]} addGstreamerLibPath) +envHooks+=(addGstreamerLibPath) diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index ff4d6ca6733..2d659d45ea6 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { sha256 = "0v9xxpkypizy9k866rvqc36zvj4kj9p8nd1nxf9znay8k3hv5khj"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + enableParallelBuilding = true; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (libintlOrEmpty != []) "-lintl"; @@ -35,8 +37,6 @@ stdenv.mkDerivation rec { then "--disable-glibtest --disable-introspection --disable-visibility" else "--with-xinput=yes"; - postInstall = "rm -rf $out/share/gtk-doc"; - passthru = { gtkExeEnvPostBuild = '' rm $out/lib/gtk-2.0/2.10.0/immodules.cache diff --git a/pkgs/development/libraries/jasper/default.nix b/pkgs/development/libraries/jasper/default.nix index ed51a0a2820..cb4f715f8d8 100644 --- a/pkgs/development/libraries/jasper/default.nix +++ b/pkgs/development/libraries/jasper/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, unzip, xlibs, libjpeg}: +{ stdenv, fetchurl, autoreconfHook, unzip, xlibs, libjpeg }: stdenv.mkDerivation rec { name = "jasper-1.900.1"; @@ -8,11 +8,15 @@ stdenv.mkDerivation rec { sha256 = "154l7zk7yh3v8l2l6zm5s2alvd2fzkp6c9i18iajfbna5af5m43b"; }; - nativeBuildInputs = [unzip]; + nativeBuildInputs = [ unzip autoreconfHook ]; propagatedBuildInputs = [ libjpeg ]; configureFlags = "--enable-shared"; - + + outputs = [ "dev" "out" "man" "bin" ]; + + enableParallelBuilding = true; + meta = { homepage = http://www.ece.uvic.ca/~mdadams/jasper/; description = "JPEG2000 Library"; diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 264868e4a97..0cbda2e1405 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -10,7 +10,7 @@ , vaapiSupport ? false, libva ? null # ToDo: it has huge closure , vdpauSupport ? true, libvdpau ? null , freetypeSupport ? true, freetype ? null # it's small and almost everywhere -, SDL # only for avplay in $tools, adds nontrivial closure to it +, SDL # only for avplay in $bin, adds nontrivial closure to it , enableGPL ? true # ToDo: some additional default stuff may need GPL , enableUnfree ? faacSupport }: @@ -77,12 +77,12 @@ let enableParallelBuilding = true; - outputs = [ "out" "tools" ]; + outputs = [ "dev" "out" "bin" ]; postInstall = '' - mkdir -p "$tools/bin" - mv "$out/bin/avplay" "$tools/bin" - cp -s "$out"/bin/* "$tools/bin/" + mkdir -p "$bin/bin" + mv "$out/bin/avplay" "$bin/bin" + cp -s "$out"/bin/* "$bin/bin/" ''; doInstallCheck = false; # fails randomly diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index d7a6f8d5443..a2bfa08c0da 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0c20wpfa94d8kww0f2xinmm4axsl4nhq921xj4i88yhpjbhbn3z2"; }; + outputs = [ "dev" "out" ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libpthreadstubs libpciaccess ] ++ stdenv.lib.optional stdenv.isLinux udev; diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index 407b367d6b7..e6a691df363 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, gettext }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libelf-0.8.13"; src = fetchurl { @@ -10,6 +10,11 @@ stdenv.mkDerivation (rec { doCheck = true; + # Libelf's custom NLS macros fail to determine the catalog file extension on + # Darwin, so disable NLS for now. + # FIXME: Eventually make Gettext a build input on all platforms. + configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls"; + meta = { description = "ELF object file access library"; @@ -21,12 +26,3 @@ stdenv.mkDerivation (rec { maintainers = [ ]; }; } - -// - -# Libelf's custom NLS macros fail to determine the catalog file extension on -# Darwin, so disable NLS for now. -# FIXME: Eventually make Gettext a build input on all platforms. -(if stdenv.isDarwin - then { configureFlags = [ "--disable-nls" ]; } - else { })) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index da5a080521c..69c8aab6450 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -10,7 +10,10 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional (stdenv.needsPax) ./libffi-3.0.13-emutramp_pax_proc.patch; - buildInputs = stdenv.lib.optional doCheck dejagnu; + outputs = [ "dev" "out" "doc" ]; + + buildInputs = [ ] + ++ stdenv.lib.optional doCheck dejagnu; configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= @@ -21,8 +24,14 @@ stdenv.mkDerivation rec { dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. postInstall = - # Install headers in the right place. - '' ln -s${if stdenv.isFreeBSD then "" else "r"}v "$out/lib/"libffi*/include "$out/include" + # Install headers and libs in the right places. + '' mv "$out"/lib64/* "$out/lib" + rmdir "$out/lib64" + ln -s lib "$out/lib64" + + mkdir -p "$dev/" + mv "$out/lib/${name}/include" "$dev/include" + rmdir "$out/lib/${name}" ''; meta = { diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index bf27e074dd5..84732670eef 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, nasm }: +{ stdenv, fetchurl, nasm, autoreconfHook }: stdenv.mkDerivation rec { name = "libjpeg-turbo-1.3.1"; @@ -8,7 +8,11 @@ stdenv.mkDerivation rec { sha256 = "1fbgcvlnn3d5gvf0v9jnlcabpv2z3nwxclzyabahxi6x2xs90cn1"; }; - buildInputs = [ nasm ]; + outputs = [ "dev" "out" "doc" "bin" ]; + + buildInputs = [ autoreconfHook nasm ]; + + enableParallelBuilding = true; doCheck = true; checkTarget = "test"; diff --git a/pkgs/development/libraries/libjpeg/default.nix b/pkgs/development/libraries/libjpeg/default.nix index d7a1bcb4638..8884546bcdf 100644 --- a/pkgs/development/libraries/libjpeg/default.nix +++ b/pkgs/development/libraries/libjpeg/default.nix @@ -1,17 +1,19 @@ -{ stdenv, fetchurl, static ? false }: +{ stdenv, fetchurl, static ? false }: with stdenv.lib; stdenv.mkDerivation { name = "libjpeg-8d"; - + src = fetchurl { url = http://www.ijg.org/files/jpegsrc.v8d.tar.gz; sha256 = "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"; }; configureFlags = optional static "--enable-static --disable-shared"; - + + outputs = [ "dev" "out" "man" "bin" ]; + meta = { homepage = http://www.ijg.org/; description = "A library that implements the JPEG image file format"; diff --git a/pkgs/development/libraries/libogg/default.nix b/pkgs/development/libraries/libogg/default.nix index 492538f1802..9d5b9cd9298 100644 --- a/pkgs/development/libraries/libogg/default.nix +++ b/pkgs/development/libraries/libogg/default.nix @@ -5,13 +5,15 @@ let in stdenv.mkDerivation { inherit name; - + src = fetchurl { url = "http://downloads.xiph.org/releases/ogg/${name}.tar.xz"; sha256 = "16z74q422jmprhyvy7c9x909li8cqzmvzyr8cgbm52xcsp6pqs1z"; }; meta = with stdenv.lib; { + + outputs = [ "dev" "doc" "out" ]; homepage = http://xiph.org/ogg/; license = licenses.bsd3; maintainers = [ maintainers.emery ]; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index 3f8622535db..fa5c64eb911 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -18,13 +18,18 @@ in stdenv.mkDerivation rec { url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; inherit sha256; }; - postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; + outputs = [ "dev" "out" "man" ]; + propagatedBuildInputs = [ zlib ]; + preConfigure = "export bin=$dev"; + doCheck = true; + postInstall = ''mv "$out/bin" "$dev/bin"''; + passthru = { inherit zlib; }; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 85d51d0ad71..f885024bca0 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, fftw, libsndfile }: +{ stdenv, fetchurl, pkgconfig, libsndfile }: stdenv.mkDerivation rec { name = "libsamplerate-0.1.8"; @@ -9,12 +9,14 @@ stdenv.mkDerivation rec { }; buildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ fftw libsndfile ]; + propagatedBuildInputs = [ libsndfile ]; # maybe interesting configure flags: #--disable-fftw disable usage of FFTW #--disable-cpu-clip disable tricky cpu specific clipper + outputs = [ "dev" "bin" "out" ]; + postConfigure = stdenv.lib.optionalString stdenv.isDarwin '' # need headers from the Carbon.framework in /System/Library/Frameworks to diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index 74140d5f335..c4bdc23f937 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -10,6 +10,10 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig flac libogg libvorbis ]; + enableParallelBuilding = true; + + outputs = [ "dev" "out" "bin" "doc" ]; + # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle preConfigure = stdenv.lib.optionalString stdenv.isDarwin diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 7ed9794011c..681d3d97af5 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -32,6 +32,8 @@ stdenv.mkDerivation rec { patch -p0 < ${patchDir}/${if stdenv.isDarwin then "tiff-4.0.3" else "*"}-tiff2pdf-colors.patch ''; # ^ 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" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection) diff --git a/pkgs/development/libraries/libvorbis/default.nix b/pkgs/development/libraries/libvorbis/default.nix index 0dd99605b33..940e5a5685c 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -5,12 +5,14 @@ let in stdenv.mkDerivation { inherit name; - + src = fetchurl { url = "http://downloads.xiph.org/releases/vorbis/${name}.tar.xz"; sha256 = "0wpk87jnhngcl3nc5i39flkycx1sjzilx8jjx4zc4p8r55ylj19g"; }; + outputs = [ "dev" "out" "doc" ]; + buildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libogg ]; diff --git a/pkgs/development/libraries/libxml2/setup-hook.sh b/pkgs/development/libraries/libxml2/setup-hook.sh index 112dbe0c513..f9fc633c7da 100644 --- a/pkgs/development/libraries/libxml2/setup-hook.sh +++ b/pkgs/development/libraries/libxml2/setup-hook.sh @@ -23,5 +23,5 @@ if test -z "$libxmlHookDone"; then # xmllint and xsltproc from looking in /etc/xml/catalog. export XML_CATALOG_FILES if test -z "$XML_CATALOG_FILES"; then XML_CATALOG_FILES=" "; fi - envHooks=(${envHooks[@]} addXMLCatalogs) + envHooks+=(addXMLCatalogs) fi diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 54fd8d3810e..1458aedc0b1 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { patch -R -p1 < ${./rtti.patch} ''; - outputs = ["out" "drivers" "osmesa"]; + outputs = [ "dev" "out" "drivers" "osmesa" ]; configureFlags = [ "--with-dri-driverdir=$(drivers)/lib/dri" @@ -113,8 +113,8 @@ stdenv.mkDerivation { '' + optionalString enableExtraFeatures '' `#$out/lib/libXvMC*` \ $out/lib/gbm $out/lib/libgbm* \ - $out/lib/gallium-pipe \ '' + '' + $out/lib/gallium-pipe \ $out/lib/libdricore* \ $out/lib/libgallium* \ $out/lib/vdpau \ @@ -134,8 +134,8 @@ stdenv.mkDerivation { sed "/^libdir=/s,$out,$drivers," -i \ '' + optionalString enableExtraFeatures '' `#$drivers/lib/libXvMC*.la` \ - $drivers/lib/gallium-pipe/*.la \ '' + '' + $drivers/lib/gallium-pipe/*.la \ $drivers/lib/libgallium.la \ $drivers/lib/vdpau/*.la \ $drivers/lib/libdricore*.la diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index 653481aeccd..901752e3fe3 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0sqvpfkzamxdr87anzakf9dhkfh15lfmm5bsqajk02h1mxh3zivr"; }; + outputs = [ "dev" "out" "doc" ]; + buildInputs = [ gmp ]; configureFlags = diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index c972635c9c7..e2a5eec77db 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -48,7 +48,11 @@ stdenv.mkDerivation { patches = patchesCross false; - buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; + outputs = [ "dev" "out" "man" "bin" ]; + setOutputFlags = false; + + buildInputs = [ ] + ++ stdenv.lib.optional withCryptodev cryptodevHeaders; nativeBuildInputs = [ perl ]; @@ -67,7 +71,7 @@ stdenv.mkDerivation { sed -i -e "s|-march=i486|-march=x86-64|g" Makefile ''; - makeFlags = "MANDIR=$(out)/share/man"; + makeFlags = "MANDIR=$(man)/share/man"; # Parallel building is broken in OpenSSL. enableParallelBuilding = false; @@ -79,6 +83,18 @@ stdenv.mkDerivation { if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib)" ]; then rm $out/lib/*.a fi + + mkdir -p $bin + mv $out/bin $bin/ + + rm -rf $out/etc/ssl/misc + + mkdir $dev + mv $out/include $dev/ + + # OpenSSL installs readonly files, which otherwise we can't strip. + # FIXME: Can remove this after the next stdenv merge. + chmod -R +w $out ''; # */ crossAttrs = { @@ -89,14 +105,6 @@ stdenv.mkDerivation { export configureFlags="--libdir=lib --cross-compile-prefix=${stdenv.cross.config}- shared ${opensslCrossSystem}" ''; - postInstall = '' - # Openssl installs readonly files, which otherwise we can't strip. - # This could at some stdenv hash change be put out of crossAttrs, too - chmod -R +w $out - - # Remove references to perl, to avoid depending on it at runtime - rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget - ''; configureScript = "./Configure"; } // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") { CC = "gcc"; diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 40b02c2afbb..355c4c048c7 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -9,10 +9,11 @@ stdenv.mkDerivation rec { sha256 = "08aqis6j8nd1lb4f2h4h9d9kjvp54iwf8zvqzss0qn4v7nfcjyvx"; }; + outputs = [ "dev" "out" "bin" "doc" ]; + buildInputs = with stdenv.lib; optional (!stdenv.isDarwin) gobjectIntrospection # build problems of itself and flex ++ optionals stdenv.isDarwin [ gettext fontconfig ]; - nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ x11 glib cairo libpng harfbuzz ] ++ libintlOrEmpty; @@ -25,8 +26,6 @@ stdenv.mkDerivation rec { # .../bin/sh: line 5: 14823 Abort trap: 6 srcdir=. PANGO_RC_FILE=./pangorc ${dir}$tst # FAIL: testiter doCheck = !stdenv.isDarwin; - postInstall = "rm -rf $out/share/gtk-doc"; - meta = { description = "A library for laying out and rendering of text, with an emphasis on internationalization"; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 4cf6bd44dd3..961a9e7b9ea 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "0gsqmsp0q0n3q0ba32gkjvgcsdy6nwidqa7sbxkbw817zzhkl15n"; }; + outputs = [ "dev" "out" "bin" "doc" "man" ]; + # The compiler on Darwin crashes with an internal error while building the # C++ interface. Disabling optimizations on that platform remedies the # problem. In case we ever update the Darwin GCC version, the exception for @@ -30,6 +32,12 @@ stdenv.mkDerivation rec { buildInputs = [ windows.mingw_w64_pthreads.crossDrv ]; }; + postInstall = + '' + mkdir $dev/bin + mv $bin/bin/pcre-config $dev/bin/ + ''; + meta = { homepage = "http://www.pcre.org/"; description = "A library for Perl Compatible Regular Expressions"; diff --git a/pkgs/development/libraries/slib/setup-hook.sh b/pkgs/development/libraries/slib/setup-hook.sh index 32dde7d1f7a..62b72d6dc0a 100644 --- a/pkgs/development/libraries/slib/setup-hook.sh +++ b/pkgs/development/libraries/slib/setup-hook.sh @@ -10,4 +10,4 @@ addSlibPath () { fi } -envHooks=(${envHooks[@]} addSlibPath) +envHooks+=(addSlibPath) diff --git a/pkgs/development/libraries/speex/default.nix b/pkgs/development/libraries/speex/default.nix index 93a01a3d2bc..6aceef78eea 100644 --- a/pkgs/development/libraries/speex/default.nix +++ b/pkgs/development/libraries/speex/default.nix @@ -2,11 +2,18 @@ stdenv.mkDerivation rec { name = "speex-1.2rc1"; - + src = fetchurl { url = "http://downloads.us.xiph.org/releases/speex/${name}.tar.gz"; sha256 = "19mpkhbz3s08snvndn0h1dk2j139max6b0rr86nnsjmxazf30brl"; }; - + buildInputs = [ libogg ]; + + outputs = [ "dev" "out" "bin" "doc" ]; + + meta = { + homepage = http://www.speex.org/; + description = "A audio compression codec designed for speech"; + }; } diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 0938e2a17a7..3db3ad449c1 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -13,15 +13,21 @@ stdenv.mkDerivation rec { sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n"; }; - configureFlags = if static then "" else "--shared"; + outputs = [ "dev" "out" "static" "man" ]; + setOutputFlags = false; + + configureFlags = stdenv.lib.optional (!static) "--shared"; preConfigure = '' if test -n "$crossConfig"; then export CC=$crossConfig-gcc - configureFlags=${if static then "" else "--shared"} fi ''; + postInstall = '' + _moveToOutput lib/libz.a "$static" + ''; + # As zlib takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc"; diff --git a/pkgs/development/lisp-modules/clwrapper/setup-hook.sh b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh index e5deb47fd5d..b48f916ac7a 100644 --- a/pkgs/development/lisp-modules/clwrapper/setup-hook.sh +++ b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh @@ -33,7 +33,7 @@ collectNixLispLDLP () { export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF -envHooks=(envHooks[@] addASDFPaths setLisp collectNixLispLDLP) +envHooks+=(addASDFPaths setLisp collectNixLispLDLP) mkdir -p "$HOME"/.cache/common-lisp || HOME="$TMP/.temp-$USER-home" mkdir -p "$HOME"/.cache/common-lisp diff --git a/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh b/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh index 876556a7b92..a93a7250beb 100644 --- a/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh +++ b/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh @@ -2,4 +2,4 @@ addOcamlMakefile () { export OCAMLMAKEFILE="@out@/include/OCamlMakefile" } -envHooks=(${envHooks[@]} addOcamlMakefile) +envHooks+=(addOcamlMakefile) diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 7c51bf1b591..d657a6ccc98 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -28,6 +28,13 @@ preConfigure() { perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags } +preFixup() { + if [ -n "$man" ]; then + mkdir -p $man/share + if [ -d $out/man ]; then mv $out/man $man/share/; fi + fi +} + postFixup() { # If a user installs a Perl package, she probably also wants its # dependencies in the user environment (since Perl modules don't diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 96094ab4e53..121581d8397 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -1,13 +1,15 @@ perl: -{ buildInputs ? [], ... } @ attrs: +{ buildInputs ? [], name, ... } @ attrs: perl.stdenv.mkDerivation ( { + outputs = [ "out" "man" ]; + doCheck = true; - + checkTarget = "test"; - + # Prevent CPAN downloads. PERL_AUTOINSTALL = "--skipdeps"; @@ -20,7 +22,7 @@ perl.stdenv.mkDerivation ( attrs // { - name = "perl-" + attrs.name; + name = "perl-" + name; builder = ./builder.sh; buildInputs = buildInputs ++ [ perl ]; } diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 45dffe06676..e6f0e7affe9 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2, libarchive +{ stdenv, fetchurl, fetchpatch, replace, pkgconfig, curl, expat, zlib, bzip2, libarchive , useNcurses ? false, ncurses, useQt4 ? false, qt4 }: @@ -39,12 +39,12 @@ stdenv.mkDerivation rec { sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv"; }); - buildInputs = [ curl expat zlib bzip2 libarchive ] + buildInputs = [ pkgconfig curl expat zlib bzip2 libarchive ] ++ optional useNcurses ncurses ++ optional useQt4 qt4; - CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs; - + CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" (buildInputs ++ [zlib.out]); + configureFlags = "--docdir=/share/doc/${name} --mandir=/share/man --system-libs" + stdenv.lib.optionalString useQt4 " --qt-gui"; diff --git a/pkgs/development/tools/misc/automake/setup-hook.sh b/pkgs/development/tools/misc/automake/setup-hook.sh index 6f34f0d0ae1..5cd8c6229f6 100644 --- a/pkgs/development/tools/misc/automake/setup-hook.sh +++ b/pkgs/development/tools/misc/automake/setup-hook.sh @@ -2,4 +2,4 @@ addAclocals () { addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal } -envHooks=(${envHooks[@]} addAclocals) +envHooks+=(addAclocals) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index fc48a4aabad..316089fa7c6 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -34,6 +34,8 @@ stdenv.mkDerivation rec { ./pt-pax-flags-20121023.patch ]; + outputs = [ "dev" "out" "info" ]; + buildInputs = [ zlib ] ++ optional gold bison; @@ -66,6 +68,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postFixup = "ln -s $out/bin $dev/bin"; # tools needed for development + meta = { description = "Tools for manipulating binaries (linker, assembler, etc.)"; diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix index 8b0a92c1244..924113ea548 100644 --- a/pkgs/development/tools/misc/libtool/libtool2.nix +++ b/pkgs/development/tools/misc/libtool/libtool2.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, m4, perl, lzma }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libtool-2.4.2"; src = fetchurl { @@ -8,6 +8,8 @@ stdenv.mkDerivation (rec { sha256 = "0649qfpzkswgcj9vqkkr9rn4nlcx80faxpyqscy2k1x9c94f93dk"; }; + outputs = [ "out" "lib" ]; + nativeBuildInputs = [ lzma m4 perl ]; # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the @@ -18,6 +20,10 @@ stdenv.mkDerivation (rec { # leads to the failure of a number of tests. doCheck = false; + # Don't run the native `strip' when cross-compiling. This breaks at least + # with `.a' files for MinGW. + dontStrip = stdenv ? cross; + meta = { description = "GNU Libtool, a generic library support script"; @@ -38,11 +44,3 @@ stdenv.mkDerivation (rec { maintainers = [ stdenv.lib.maintainers.ludo ]; }; } - -// - -# Don't run the native `strip' when cross-compiling. This breaks at least -# with `.a' files for MinGW. -(if (stdenv ? cross) - then { dontStrip = true; } - else { })) diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 06b5c2ef516..b3121ac7944 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -8,6 +8,10 @@ stdenv.mkDerivation rec { sha256 = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7"; }; + setupHook = [ ./setup-hook.sh ]; + + #doCheck = true; # problems when loading libc.so.6 + meta = { homepage = http://nixos.org/patchelf.html; license = "GPL"; diff --git a/pkgs/development/tools/misc/patchelf/setup-hook.sh b/pkgs/development/tools/misc/patchelf/setup-hook.sh new file mode 100644 index 00000000000..b0d37b73e2b --- /dev/null +++ b/pkgs/development/tools/misc/patchelf/setup-hook.sh @@ -0,0 +1,16 @@ +# This setup hook calls patchelf to automatically remove unneeded +# directories from the RPATH of every library or executable in every +# output. + +fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi') + +patchELF() { + header "patching ELF executables and libraries in $prefix" + if [ -e "$prefix" ]; then + find "$prefix" \( \ + \( -type f -a -name "*.so*" \) -o \ + \( -type f -a -perm +0100 \) \ + \) -print -exec patchelf --shrink-rpath '{}' \; + fi + stopNest +} diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index 2ce1fd7b6e4..4decdc424d5 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -1,22 +1,27 @@ -{stdenv, fetchurl, automake, vanilla ? false}: +{ stdenv, fetchurl, automake, vanilla ? false }: -stdenv.mkDerivation (rec { +let + inherit (stdenv.lib) optional; +in +stdenv.mkDerivation rec { name = "pkg-config-0.28"; - + setupHook = ./setup-hook.sh; - + src = fetchurl { url = "http://pkgconfig.freedesktop.org/releases/${name}.tar.gz"; sha256 = "0igqq5m204w71m11y0nipbdf5apx87hwfll6axs12hn4dqfb6vkb"; }; + # Process Requires.private properly, see + # http://bugs.freedesktop.org/show_bug.cgi?id=4738. + patches = optional (!vanilla) ./requires-private.patch; + + preConfigure = stdenv.lib.optionalString (stdenv.system == "mips64el-linux") + ''cp -v ${automake}/share/automake*/config.{sub,guess} .''; configureFlags = [ "--with-internal-glib" ]; - patches = if vanilla then [] else [ - # Process Requires.private properly, see - # http://bugs.freedesktop.org/show_bug.cgi?id=4738. - ./requires-private.patch - ]; + postInstall = ''rm "$out"/bin/*-pkg-config''; # clean the duplicate file meta = { description = "A tool that allows packages to find out information about other packages"; @@ -24,9 +29,5 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; -} // (if stdenv.system == "mips64el-linux" then - { - preConfigure = '' - cp -v ${automake}/share/automake*/config.{sub,guess} . - ''; - } else {})) +} + diff --git a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh index 77a69fb1878..1c153976a34 100644 --- a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh +++ b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh @@ -4,7 +4,7 @@ addPkgConfigPath () { } if test -n "$crossConfig"; then - crossEnvHooks=(${crossEnvHooks[@]} addPkgConfigPath) + crossEnvHooks+=(addPkgConfigPath) else - envHooks=(${envHooks[@]} addPkgConfigPath) + envHooks+=(addPkgConfigPath) fi diff --git a/pkgs/development/tools/misc/texinfo/5.2.nix b/pkgs/development/tools/misc/texinfo/5.2.nix index 62e1ff62d1e..53076476f89 100644 --- a/pkgs/development/tools/misc/texinfo/5.2.nix +++ b/pkgs/development/tools/misc/texinfo/5.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, perl, xz, interactive ? false }: +{ stdenv, fetchurl, xz, ncurses, perl, interactive ? false }: stdenv.mkDerivation rec { name = "texinfo-5.2"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"; }; - buildInputs = [ perl xz ] + buildInputs = [ perl xz.bin ] ++ stdenv.lib.optional interactive ncurses; preInstall = '' diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 4c0176de7e8..cfbabad72cc 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -42,8 +42,8 @@ stdenv.mkDerivation { mkdir -p $OCAMLFIND_DESTDIR fi } - - envHooks=(''${envHooks[@]} addOCamlPath) + + envHooks+=(addOCamlPath) ''; meta = { diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index 1b3d4950e37..57968bfe8f4 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -45,9 +45,9 @@ in stdenv.mkDerivation { (cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch}) '' else null; - buildInputs = [ python which ] + buildInputs = [ python openssl ] ++ (optional stdenv.isLinux utillinux) - ++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ]; + ++ optionals stdenv.isDarwin [ pkgconfig dtrace ]; setupHook = ./setup-hook.sh; meta = { diff --git a/pkgs/development/web/nodejs/setup-hook.sh b/pkgs/development/web/nodejs/setup-hook.sh index 41a9746ba42..e1f4d9089f3 100644 --- a/pkgs/development/web/nodejs/setup-hook.sh +++ b/pkgs/development/web/nodejs/setup-hook.sh @@ -2,4 +2,4 @@ addNodePath () { addToSearchPath NODE_PATH $1/lib/node_modules } -envHooks=(${envHooks[@]} addNodePath) +envHooks+=(addNodePath) |