summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-05 13:23:01 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-05 13:44:16 +0200
commit38313d5d877fc421d1381971051107e4b03dc40d (patch)
tree8143c1a0d11cd8d0cf10fe59a67508baa975ffba /pkgs/development
parentf8c211fd2b53d970a439d643bea9d0928fb08666 (diff)
downloadnixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar.gz
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar.bz2
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar.lz
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar.xz
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.tar.zst
nixlib-38313d5d877fc421d1381971051107e4b03dc40d.zip
libxml2,libxslt: split into multiple outputs
Fixed all references, hopefully.
libxml2Python is slightly hacky now, but it seems to work.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/interpreters/php/default.nix2
-rw-r--r--pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix12
-rw-r--r--pkgs/development/interpreters/ruby/patches.nix4
-rw-r--r--pkgs/development/libraries/fontconfig/default.nix2
-rw-r--r--pkgs/development/libraries/gupnp/default.nix2
-rw-r--r--pkgs/development/libraries/libguestfs/default.nix2
-rw-r--r--pkgs/development/libraries/libxml2/default.nix41
-rw-r--r--pkgs/development/libraries/libxslt/default.nix15
-rw-r--r--pkgs/development/libraries/mailcore2/default.nix2
-rw-r--r--pkgs/development/libraries/pdf2xml/default.nix4
-rw-r--r--pkgs/development/r-modules/default.nix2
-rw-r--r--pkgs/development/tools/vagrant/default.nix14
12 files changed, 53 insertions, 49 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 59630d1814fa..6247663e3f40 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -67,7 +67,7 @@ let
 
         libxml2 = {
           configureFlags = [
-            "--with-libxml-dir=${libxml2}"
+            "--with-libxml-dir=${libxml2.dev}"
             ];
           buildInputs = [ libxml2 ];
         };
diff --git a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
index 3ae74057a54f..c91c6da28d9f 100644
--- a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
+++ b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
@@ -63,12 +63,12 @@ in
     buildFlags = [
       "--use-system-libraries"
       "--with-zlib-dir=${zlib}"
-      "--with-xml2-lib=${libxml2}/lib"
-      "--with-xml2-include=${libxml2}/include/libxml2"
-      "--with-xslt-lib=${libxslt}/lib"
-      "--with-xslt-include=${libxslt}/include"
-      "--with-exslt-lib=${libxslt}/lib"
-      "--with-exslt-include=${libxslt}/include"
+      "--with-xml2-lib=${libxml2.out}/lib"
+      "--with-xml2-include=${libxml2.dev}/include/libxml2"
+      "--with-xslt-lib=${libxslt.out}/lib"
+      "--with-xslt-include=${libxslt.dev}/include"
+      "--with-exslt-lib=${libxslt.out}/lib"
+      "--with-exslt-include=${libxslt.dev}/include"
     ] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}";
     buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
   };
diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix
index 0cc477c991ef..be79c5c957ab 100644
--- a/pkgs/development/interpreters/ruby/patches.nix
+++ b/pkgs/development/interpreters/ruby/patches.nix
@@ -82,8 +82,8 @@ in
   nokogiri = {
     buildInputs = [ libxml2 ];
     buildFlags =
-      [ "--with-xml2-dir=${libxml2} --with-xml2-include=${libxml2}/include/libxml2"
-        "--with-xslt-dir=${libxslt}  --use-system-libraries"
+      [ "--with-xml2-dir=${libxml2.out} --with-xml2-include=${libxml2.dev}/include/libxml2"
+        "--with-xslt-dir=${libxslt.out}  --use-system-libraries"
         libiconv
       ];
   };
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
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index a9d81f028f4a..fc0cdf72449f 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -1558,7 +1558,7 @@ let
     });
 
     xml2 = old.xml2.overrideDerivation (attrs: {
-      preConfigure = "export LIBXML_INCDIR=${pkgs.libxml2}/include/libxml2";
+      preConfigure = "export LIBXML_INCDIR=${pkgs.libxml2.dev}/include/libxml2";
     });
 
     curl = old.curl.overrideDerivation (attrs: {
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index 085807e1bfad..f7a592682cad 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
 
     # openssl: c_rehash, openssl
     rm opt/vagrant/embedded/bin/{c_rehash,openssl}
-    ln -s ${openssl}/bin/c_rehash opt/vagrant/embedded/bin
-    ln -s ${openssl}/bin/openssl opt/vagrant/embedded/bin
+    ln -s ${openssl.bin}/bin/c_rehash opt/vagrant/embedded/bin
+    ln -s ${openssl.bin}/bin/openssl opt/vagrant/embedded/bin
 
     # ruby: erb, gem, irb, rake, rdoc, ri, ruby, testrb
     rm opt/vagrant/embedded/bin/{erb,gem,irb,rake,rdoc,ri,ruby,testrb}
@@ -77,14 +77,14 @@ stdenv.mkDerivation rec {
 
     # libxml: xml2-config, xmlcatalog, xmllint
     rm opt/vagrant/embedded/bin/{xml2-config,xmlcatalog,xmllint}
-    ln -s ${libxml2}/bin/xml2-config opt/vagrant/embedded/bin
-    ln -s ${libxml2}/bin/xmlcatalog opt/vagrant/embedded/bin
-    ln -s ${libxml2}/bin/xmllint opt/vagrant/embedded/bin
+    ln -s ${libxml2.dev}/bin/xml2-config opt/vagrant/embedded/bin
+    ln -s ${libxml2.bin}/bin/xmlcatalog opt/vagrant/embedded/bin
+    ln -s ${libxml2.bin}/bin/xmllint opt/vagrant/embedded/bin
 
     # libxslt: xslt-config, xsltproc
     rm opt/vagrant/embedded/bin/{xslt-config,xsltproc}
-    ln -s ${libxslt}/bin/xslt-config opt/vagrant/embedded/bin
-    ln -s ${libxslt}/bin/xsltproc opt/vagrant/embedded/bin
+    ln -s ${libxslt.dev}/bin/xslt-config opt/vagrant/embedded/bin
+    ln -s ${libxslt.bin}/bin/xsltproc opt/vagrant/embedded/bin
 
     mkdir -p "$out"
     cp -r opt "$out"