diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
commit | fb59f27a4368b1436518f9f76c6e2e68f60b92a6 (patch) | |
tree | a68c3ac03a7ea04fd4b756a9d3cabf2667896e62 /pkgs/development/libraries | |
parent | 4dccb224c584194e964b5fbef5fe2cee28c57803 (diff) |
WIP: getting good
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/freetype/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/glib/setup-hook.sh | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gmp/5.1.x.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/libffi/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/libjpeg-turbo/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/libpng/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/libtiff/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/libvorbis/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/mpfr/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/openssl/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 11 |
12 files changed, 49 insertions, 36 deletions
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 1df9e46c0f705..aa20a69978670 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -23,10 +23,6 @@ stdenv.mkDerivation rec { sha256 = "0pppcn73b5pwd7zdi9yfx16f5i93y18q7q4jmlkwmwrfsllqp160"; }; - outputs = [ "dev" "out" ]; - - configureFlags = "--disable-static --bindir=$(dev)/bin"; - patches = [ ./enable-validation.patch ] # from Gentoo ++ [ (fetch_bohoomil "freetype-2.5.3-pkgconfig.patch" "1dpfdh8kmka3gzv14glz7l79i545zizah6wma937574v5z2iy3nn") @@ -36,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 ] + buildInputs = [ stdenv.hookLib.multiout 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. @@ -52,12 +52,8 @@ stdenv.mkDerivation rec { doCheck = true; # compat hacks - postInstall = glib.flattenInclude + '' - ln -s . "$out"/include/freetype - - mkdir $dev/lib - mv $out/lib/pkgconfig $dev/lib/ - ln -s freetype2/freetype $dev/include/freetype + postFixup = glib.flattenInclude + '' + ln -s . "$dev"/include/freetype ''; crossAttrs = { diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 55d80e5ccff8a..c38d34eb94ae8 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -51,11 +51,11 @@ stdenv.mkDerivation rec { patches = optional stdenv.isDarwin ./darwin-compilation.patch; - outputs = [ "dev" "out" "bin" ]; # ToDo: docs? + #outputs = [ "dev" "out" "bin" ]; # ToDo: no idea what's wrong! docs? - setupHook = ./setup-hook.sh; + #setupHook = ./setup-hook.sh; - buildInputs = [ stdenv.hookLib.multiout libelf ] + buildInputs = [ /*stdenv.hookLib.multiout*/ libelf ] ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ]; nativeBuildInputs = [ pkgconfig gettext perl python ]; diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index f173744e5ca63..35d7d9d8fbe99 100644 --- a/pkgs/development/libraries/glib/setup-hook.sh +++ b/pkgs/development/libraries/glib/setup-hook.sh @@ -14,4 +14,4 @@ glibPreFixupPhase() { addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name" } -preFixupPhases="$preFixupPhases glibPreFixupPhase" +preFixupPhases+=(glibPreFixupPhase) diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 9e28334804bd6..778b5144f291a 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,9 @@ stdenv.mkDerivation (rec { sha256 = "0q5i39pxrasgn9qdxzpfbwhh11ph80p57x6hf48m74261d97j83m"; }; + outputs = [ "out" "info" ]; + buildInputs = [ stdenv.hookLib.multiout ]; + nativeBuildInputs = [ m4 ]; configureFlags = @@ -22,6 +25,7 @@ stdenv.mkDerivation (rec { ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" ++ optional stdenv.is64bit "--with-pic" ; + dontDisableStatic = withStatic; doCheck = true; @@ -58,6 +62,4 @@ stdenv.mkDerivation (rec { maintainers = [ maintainers.simons ]; }; } - // stdenv.lib.optionalAttrs withStatic { dontDisableStatic = true; } -) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index da5a080521c6d..f62dff58968f7 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.hookLib.multiout ] + ++ stdenv.lib.optional doCheck dejagnu; configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index f59c205af4fdf..a27d5af6f8dfb 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"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" "bin" ]; - buildInputs = [ nasm ]; + buildInputs = [ stdenv.hookLib.multiout autoreconfHook nasm ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index c4aa41681a30d..7014c7686188d 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -18,17 +18,19 @@ 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" ]; - - preConfigure = "export bin=$dev"; - - postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; + buildInputs = [ stdenv.hookLib.multiout ]; 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/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index aa4ac0a792238..55db7692ffd1c 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -19,8 +19,6 @@ stdenv.mkDerivation rec { sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa"; }; - outputs = [ "dev" "out" "bin" "doc" ]; - patchPhase = '' for p in ${patchDir}/*-{2013-4244,2012-4447,2012-4564,2013-1960,2013-1961,libjpeg-turbo}.patch; do patch -p1 < "$p" @@ -34,6 +32,9 @@ 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" ]; + buildInputs = [ stdenv.hookLib.multiout ]; + 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 5e883771b71af..6bdf10765deb9 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -11,11 +11,11 @@ stdenv.mkDerivation { sha256 = "0wpk87jnhngcl3nc5i39flkycx1sjzilx8jjx4zc4p8r55ylj19g"; }; - buildInputs = [ pkgconfig ]; + outputs = [ "dev" "out" "doc" ]; - propagatedBuildInputs = [ libogg ]; + buildInputs = [ stdenv.hookLib.multiout pkgconfig ]; - outputs = [ "dev" "out" "doc" ]; + propagatedBuildInputs = [ libogg ]; doCheck = true; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index e3fbaececb9b5..07ab3187f8cfa 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { sha256 = "0sqvpfkzamxdr87anzakf9dhkfh15lfmm5bsqajk02h1mxh3zivr"; }; - buildInputs = [ gmp ]; + outputs = [ "dev" "out" "doc" ]; + + buildInputs = [ stdenv.hookLib.multiout gmp ]; configureFlags = /* Work around a FreeBSD bug that otherwise leads to segfaults in the test suite: diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 847e4f0ac9d9b..babf49274607e 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -49,10 +49,10 @@ stdenv.mkDerivation { patches = patchesCross false; outputs = [ "dev" "out" "man" "bin" ]; + setOutputFlags = false; - setOutputFlags = false; # ToDo: strange? - - buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; + buildInputs = [ stdenv.hookLib.multiout ] + ++ stdenv.lib.optional withCryptodev cryptodevHeaders; nativeBuildInputs = [ perl ]; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 0938e2a17a796..5f9a01208d84d 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -13,15 +13,22 @@ stdenv.mkDerivation rec { sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n"; }; - configureFlags = if static then "" else "--shared"; + outputs = [ "dev" "out" "static" "man" ]; + buildInputs = [ stdenv.hookLib.multiout ]; + 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"; |