diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-09-12 13:21:45 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-09-12 13:21:45 +0300 |
commit | 49f4ba7ae0df11cce177135552a803ea2fa5de02 (patch) | |
tree | bce41d2533335efed3fd6ce5a8e4e2b55e55010f | |
parent | 38f074435a3a4a92ca0950e33cea1554f364fe70 (diff) | |
parent | e0b5eef4e7d21d0a914e248635f1f9360772a6d9 (diff) | |
download | nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar.gz nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar.bz2 nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar.lz nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar.xz nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.tar.zst nixlib-49f4ba7ae0df11cce177135552a803ea2fa5de02.zip |
Merge commit 'e0b5eef' from staging into master
-rw-r--r-- | lib/attrsets.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libarchive/default.nix | 19 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 686e125f100c..539eeb7b1721 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -455,7 +455,7 @@ rec { getDev = getOutput "dev"; /* Pick the outputs of packages to place in buildInputs */ - chooseDevOutputs = drvs: builtins.map (drv: if drv.outputUnspecified or false then drv.dev or drv else drv) drvs; + chooseDevOutputs = drvs: builtins.map getDev drvs; /*** deprecated stuff ***/ diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index 0c5f900dd412..34ad2532d41d 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -1,5 +1,12 @@ -{ fetchurl, stdenv, acl, openssl, libxml2, attr, zlib, bzip2, e2fsprogs, xz, lzo -, sharutils }: +{ + fetchurl, stdenv, pkgconfig, + acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, + + # Optional but increases closure only negligibly. + xarSupport ? true, +}: + +assert xarSupport -> libxml2 != null; stdenv.mkDerivation rec { name = "libarchive-${version}"; @@ -10,12 +17,16 @@ stdenv.mkDerivation rec { sha256 = "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj"; }; - buildInputs = [ sharutils libxml2 zlib bzip2 openssl xz lzo ] ++ - stdenv.lib.optionals stdenv.isLinux [ e2fsprogs attr acl ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ sharutils zlib bzip2 openssl xz lzo ] + ++ stdenv.lib.optionals stdenv.isLinux [ e2fsprogs attr acl ] + ++ stdenv.lib.optional xarSupport libxml2; # Without this, pkgconfig-based dependencies are unhappy propagatedBuildInputs = stdenv.lib.optionals stdenv.isLinux [ attr acl ]; + configureFlags = stdenv.lib.optional (!xarSupport) "--without-xml2"; + preBuild = if stdenv.isCygwin then '' echo "#include <windows.h>" >> config.h '' else null; |