diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/fontconfig/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gupnp/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libguestfs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libxml2/default.nix | 41 | ||||
-rw-r--r-- | pkgs/development/libraries/libxslt/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/libraries/mailcore2/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/pdf2xml/default.nix | 4 |
7 files changed, 36 insertions, 32 deletions
diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index f72f65ddad74..6acf1ebce29c 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { postInstall = '' cd "$out/etc/fonts" rm conf.d/{50-user,51-local}.conf - "${libxslt}/bin/xsltproc" --stringparam fontDirectories "${fontbhttf}" \ + "${libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${fontbhttf}" \ --stringparam fontconfig "$out" \ --stringparam fontconfigConfigVersion "${configVersion}" \ --path $out/share/xml/fontconfig \ diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 6145c8c49477..45f5217d3c91 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { postInstall = '' ln -sv ${libsoup}/include/*/libsoup $out/include - ln -sv ${libxml2}/include/*/libxml $out/include + ln -sv ${libxml2.dev}/include/*/libxml $out/include ln -sv ${gssdp}/include/*/libgssdp $out/include ''; diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index 313934c66574..ac6a8b2b74c3 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { configureFlags = "--disable-appliance --disable-daemon"; patches = [ ./libguestfs-syms.patch ]; - NIX_CFLAGS_COMPILE="-I${libxml2}/include/libxml2/"; + NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/"; preConfigure = '' AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 2fdc198aa115..af71c05a1c87 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,14 +1,11 @@ -{ stdenv, fetchurl, zlib, xz, python ? null, pythonSupport ? true, findXMLCatalogs }: - -assert pythonSupport -> python != null; - -#TODO: share most stuff between python and non-python builds, perhaps via multiple-output +{ stdenv, fetchurl, zlib, xz, python, findXMLCatalogs }: let version = "2.9.2"; + inherit (stdenv.lib) optional; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libxml2-${version}"; src = fetchurl { @@ -16,20 +13,32 @@ stdenv.mkDerivation (rec { sha256 = "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "bin" "doc" "py" ]; + propagatedOutputs = "out bin py"; - buildInputs = stdenv.lib.optional pythonSupport python + buildInputs = [ python ] # Libxml2 has an optional dependency on liblzma. However, on impure # platforms, it may end up using that from /usr/lib, and thus lack a # RUNPATH for that, leading to undefined references for its users. - ++ stdenv.lib.optional stdenv.isFreeBSD xz; + ++ optional stdenv.isFreeBSD xz; propagatedBuildInputs = [ zlib findXMLCatalogs ]; - passthru = { inherit pythonSupport version; }; + configureFlags = "--with-python=${python}"; enableParallelBuilding = true; + preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; + installFlags = ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"''; + + postFixup = '' + _moveToOutput bin/xml2-config "$dev" + _moveToOutput lib/xml2Conf.sh "$dev" + _moveToOutput share/man/man1 "$bin" + ''; + + passthru = { inherit version; pythonSupport = true; }; + meta = { homepage = http://xmlsoft.org/; description = "An XML parsing library for C"; @@ -37,15 +46,5 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.eelco ]; }; - -} // stdenv.lib.optionalAttrs pythonSupport { - configureFlags = "--with-python=${python}"; - - # this is a pair of ugly hacks to make python stuff install into the right place - preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$out"''; - installFlags = ''pythondir="$(out)/lib/${python.libPrefix}/site-packages"''; - -} // stdenv.lib.optionalAttrs (!pythonSupport) { - configureFlags = "--with-python=no"; # otherwise build impurity bites us -}) +} diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 3579e99ec7a8..dc74d8e95eeb 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"; }; - outputs = [ "out" "doc" ]; + outputs = [ "dev" "out" "bin" "doc" ]; buildInputs = [ libxml2 ]; @@ -17,7 +17,6 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optionals stdenv.isSunOS [ ./patch-ah.patch ]; configureFlags = [ - "--with-libxml-prefix=${libxml2}" "--without-python" "--without-crypto" "--without-debug" @@ -25,11 +24,17 @@ stdenv.mkDerivation rec { "--without-debugger" ]; - meta = { + postFixup = '' + _moveToOutput bin/xslt-config "$dev" + _moveToOutput lib/xsltConf.sh "$dev" + _moveToOutput share/man/man1 "$bin" + ''; + + meta = with stdenv.lib; { homepage = http://xmlsoft.org/XSLT/; description = "A C library and tools to do XSL transformations"; license = "bsd"; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = platforms.unix; + maintainers = [ maintainers.eelco ]; }; } diff --git a/pkgs/development/libraries/mailcore2/default.nix b/pkgs/development/libraries/mailcore2/default.nix index 8cf0744a0d14..c86205226ddd 100644 --- a/pkgs/development/libraries/mailcore2/default.nix +++ b/pkgs/development/libraries/mailcore2/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { substituteInPlace CMakeLists.txt \ --replace "tidy/tidy.h" "tidy.h" \ --replace "/usr/include/tidy" "${libtidy}/include" \ - --replace "/usr/include/libxml2" "${libxml2}/include/libxml2" \ + --replace "/usr/include/libxml2" "${libxml2.dev}/include/libxml2" \ ''; cmakeFlags = [ diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix index c7c5aff24558..4ebb0cbcc260 100644 --- a/pkgs/development/libraries/pdf2xml/default.nix +++ b/pkgs/development/libraries/pdf2xml/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation { preBuild = '' cp Makefile.linux Makefile - sed -i 's|/usr/include/libxml2|${libxml2}/include/libxml2|' Makefile - sed -i 's|-lxml2|-lxml2 -L${libxml2}/lib|' Makefile + sed -i 's|/usr/include/libxml2|${libxml2.dev}/include/libxml2|' Makefile + sed -i 's|-lxml2|-lxml2 -L${libxml2.out}/lib|' Makefile sed -i 's|XPDF = xpdf_3.01|XPDF = ${libxpdf}/lib|' Makefile mkdir exe |