diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 87964e27bb9c..61a71d834050 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -43,7 +43,7 @@ let echo "for hints about the offending path)." exit 1 fi - ${libxslt}/bin/xsltproc \ + ${libxslt.bin}/bin/xsltproc \ --stringparam revision '${revision}' \ -o $out ${./options-to-docbook.xsl} $optionsXML ''; diff --git a/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix index 2955a9371ff6..4bc7801637c6 100644 --- a/pkgs/applications/audio/swh-lv2/default.nix +++ b/pkgs/applications/audio/swh-lv2/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; patchPhase = '' - sed -e "s#xsltproc#${libxslt}/bin/xsltproc#" -i Makefile + sed -e "s#xsltproc#${libxslt.bin}/bin/xsltproc#" -i Makefile sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile ''; diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix index a254535dd703..99196cdf796b 100644 --- a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix +++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; NIX_CFLAGS_COMPILE = - "-I${libxml2}/include/libxml2 -I${json-c-0-11}/include/json-c"; + "-I${libxml2.dev}/include/libxml2 -I${json-c-0-11}/include/json-c"; NIX_LDFLAGS = "-lsqlite3 -lcurl -lxml2 -lstfl -ljson"; diff --git a/pkgs/applications/networking/p2p/retroshare/0.6.nix b/pkgs/applications/networking/p2p/retroshare/0.6.nix index 855ebdd05936..020d00170531 100644 --- a/pkgs/applications/networking/p2p/retroshare/0.6.nix +++ b/pkgs/applications/networking/p2p/retroshare/0.6.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "189qndkfq9kgv3qi3wx8ivla4j8fxr4iv7c8y9rjrjaz8jwdkn5x"; }; - NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2 -I${sqlcipher}/include/sqlcipher"; + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2 -I${sqlcipher}/include/sqlcipher"; patchPhase = '' # Fix build error diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix index a139531b19a6..e7fe79d66a56 100644 --- a/pkgs/applications/networking/p2p/retroshare/default.nix +++ b/pkgs/applications/networking/p2p/retroshare/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "0l2n4pr1hq66q6qa073hrdx3s3d7iw54z8ay1zy82zhk2rwhsavp"; }; - NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2"; patchPhase = '' sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \ diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 3182f4a5c66c..059c5eacc496 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace grep ${gnugrep}/bin/grep substituteInPlace $f --replace groff ${groff}/bin/groff substituteInPlace $f --replace gunzip ${gzip}/bin/gunzip - substituteInPlace $f --replace iconv ${libiconv}/bin/iconv + substituteInPlace $f --replace iconv ${libiconv.bin}/bin/iconv substituteInPlace $f --replace lyx ${lyx}/bin/lyx substituteInPlace $f --replace pdftotext ${xpdf}/bin/pdftotext substituteInPlace $f --replace pstotext ${ghostscript}/bin/ps2ascii @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace tar ${gnutar}/bin/tar substituteInPlace $f --replace unzip ${unzip}/bin/unzip substituteInPlace $f --replace xls2csv ${catdoc}/bin/xls2csv - substituteInPlace $f --replace xsltproc ${libxslt}/bin/xsltproc + substituteInPlace $f --replace xsltproc ${libxslt.bin}/bin/xsltproc substituteInPlace $f --replace unrtf ${unrtf}/bin/unrtf substituteInPlace $f --replace untex ${untex}/bin/untex substituteInPlace $f --replace wpd2html ${libwpd}/bin/wpd2html diff --git a/pkgs/applications/version-management/redmine/bootstrap.nix b/pkgs/applications/version-management/redmine/bootstrap.nix index 5971f2e9cddc..82643f18a554 100644 --- a/pkgs/applications/version-management/redmine/bootstrap.nix +++ b/pkgs/applications/version-management/redmine/bootstrap.nix @@ -32,8 +32,8 @@ in stdenv.mkDerivation rec { bundle config --local build.nokogiri --use-system-libraries \ --with-iconv-dir=${libiconv} \ - --with-xslt-dir=${libxslt} \ - --with-xml2-dir=${libxml2} \ + --with-xslt-dir=${libxslt.out} \ + --with-xml2-dir=${libxml2.out} \ --with-pkg-config \ --with-pg-config=${postgresql}/bin/pg_config 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" diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix index 2dc4dece75f3..04b74b4214fa 100644 --- a/pkgs/games/openlierox/default.nix +++ b/pkgs/games/openlierox/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z"; }; - NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; # The breakpad fails to build on x86_64, and it's only to report bugs upstream cmakeFlags = [ "-DBREAKPAD=0" ]; diff --git a/pkgs/misc/cups/drivers/canon/default.nix b/pkgs/misc/cups/drivers/canon/default.nix index 4c31e8d37d25..779cf9656863 100644 --- a/pkgs/misc/cups/drivers/canon/default.nix +++ b/pkgs/misc/cups/drivers/canon/default.nix @@ -202,10 +202,10 @@ stdenv.mkDerivation rec { cp libs/ThLB* $out/share/ufr2filter ) - patchelf --set-rpath "$out/lib32:${i686_libxml2}/lib" $out/lib32/libcanonufr2.so.1.0.0 + patchelf --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/lib32/libcanonufr2.so.1.0.0 patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32" $out/bin/cnpkmoduleufr2 - patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32:${i686_libxml2}/lib" $out/bin/cnpkbidi + patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/bin/cnpkbidi makeWrapper "${ghostscript}/bin/gs" "$out/bin/gs" \ --prefix LD_LIBRARY_PATH ":" "$out/lib" \ diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index bcfd885ae012..1ab3eaf03824 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ${optionalString proxySupport "--enable-proxy"} ${optionalString sslSupport "--enable-ssl"} ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"} - ${optionalString libxml2Support "--with-libxml2=${libxml2}/include/libxml2"} + ${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"} ''; postInstall = '' diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix index 54f4e1599b8c..6866dc008616 100644 --- a/pkgs/servers/http/nginx/default.nix +++ b/pkgs/servers/http/nginx/default.nix @@ -149,7 +149,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = optionalString modsecurity "-I${aprutil}/include/apr-1 -I${apacheHttpd}/include -I${apr}/include/apr-1 -I${yajl}/include"; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags" ''; meta = { diff --git a/pkgs/servers/http/nginx/unstable.nix b/pkgs/servers/http/nginx/unstable.nix index e71adba3e572..4806eabc361a 100644 --- a/pkgs/servers/http/nginx/unstable.nix +++ b/pkgs/servers/http/nginx/unstable.nix @@ -117,7 +117,7 @@ stdenv.mkDerivation rec { additionalFlags = optionalString stdenv.isDarwin "-Wno-error=deprecated-declarations"; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags" ''; postInstall = '' diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index aac626282905..147e24c014d2 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags" export PATH="$PATH:${stdenv.cc.libc.bin}/bin" patchShebangs . ''; diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index 0f28b15ea973..0d165bb4a2da 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { makeFlags = "DESTDIR=$(out)"; - NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ]; + NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ]; # Probably a hack, but using DESTDIR and PREFIX makes everything work! postInstall = '' diff --git a/pkgs/tools/networking/openconnect.nix b/pkgs/tools/networking/openconnect.nix index 54239b766174..43e48e9a4cdf 100644 --- a/pkgs/tools/networking/openconnect.nix +++ b/pkgs/tools/networking/openconnect.nix @@ -18,8 +18,8 @@ stdenv.mkDerivation rec { preConfigure = '' export PKG_CONFIG=${pkgconfig}/bin/pkg-config - export LIBXML2_CFLAGS="-I ${libxml2}/include/libxml2" - export LIBXML2_LIBS="-L${libxml2}/lib -lxml2" + export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2" + export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2" ''; configureFlags = [ diff --git a/pkgs/tools/security/modsecurity/default.nix b/pkgs/tools/security/modsecurity/default.nix index 5ed6c9ecdc4a..29007807e10c 100644 --- a/pkgs/tools/security/modsecurity/default.nix +++ b/pkgs/tools/security/modsecurity/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl +{ stdenv, lib, fetchurl, pkgconfig , curl, apacheHttpd, pcre, apr, aprutil, libxml2 }: with lib; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { sha256 = "e2bbf789966c1f80094d88d9085a81bde082b2054f8e38e0db571ca49208f434"; }; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ]; configureFlags = [ "--enable-standalone-module" diff --git a/pkgs/tools/security/mpw/default.nix b/pkgs/tools/security/mpw/default.nix index 15937a6792e6..a565c3b96e14 100644 --- a/pkgs/tools/security/mpw/default.nix +++ b/pkgs/tools/security/mpw/default.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation { patchShebangs . ''; - NIX_CFLAGS_COMPILE = "-I${libxml2}/include/libxml2"; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; buildInputs = [ autoconf automake openssl libxml2 ]; diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index b26582a6cc71..7c393c524151 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -237,12 +237,12 @@ stdenv.mkDerivation rec { # We can remove PATH= when those impurities are fixed. sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook5_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${tetex}/bin:${coreutils}/bin:${gnused}/bin')|" \ -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \ - -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt}/bin/xsltproc'|" \ + -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \ -e "s|^FOP =.*|FOP = '${fop}/bin/fop'|" \ -e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \ -e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \ - -e "s|^XMLLINT =.*|XMLLINT = '${libxml2}/bin/xmllint'|" \ + -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \ -e "s|^EPUBCHECK =.*|EPUBCHECK = 'nixpkgs_is_missing_epubcheck'|" \ -i a2x.py '' + '' diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix index 49fe7dc681fe..f99c14720760 100644 --- a/pkgs/tools/typesetting/xmlto/default.nix +++ b/pkgs/tools/typesetting/xmlto/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/xmlto" \ - --prefix PATH : "${libxslt}/bin:${libxml2}/bin:${getopt}/bin" + --prefix PATH : "${libxslt.bin}/bin:${libxml2.bin}/bin:${getopt}/bin" # `w3m' is needed for HTML to text conversions. substituteInPlace "$out/share/xmlto/format/docbook/txt" \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1791f483244..30228a63c110 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7480,14 +7480,13 @@ let libxmi = callPackage ../development/libraries/libxmi { }; - libxml2 = callPackage ../development/libraries/libxml2 { - pythonSupport = false; + libxml2 = callPackage ../development/libraries/libxml2 { }; + libxml2Python = pkgs.buildEnv { # slightly hacky + name = "libxml2+py-${pkgs.libxml2.version}"; + paths = with libxml2; [ dev bin py ]; + inherit (pkgs.libxml2) passthru; }; - libxml2Python = lowPrio (libxml2.override { - pythonSupport = true; - }); - libxmlxx = callPackage ../development/libraries/libxmlxx { }; libxmp = callPackage ../development/libraries/libxmp { };