diff options
Diffstat (limited to 'pkgs/development/libraries')
44 files changed, 223 insertions, 84 deletions
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"; |