Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20.09] libarchive: Fix MinGW build #102070

Merged
merged 3 commits into from Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkgs/development/libraries/libarchive/default.nix
Expand Up @@ -2,8 +2,10 @@
fetchFromGitHub, stdenv, pkgconfig, autoreconfHook,
acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, zstd,

# Optional but increases closure only negligibly.
xarSupport ? true,
# Optional but increases closure only negligibly. Also, while libxml2
# builds fine on windows, but libarchive has trouble linking windows
# things it depends on for some reason.
xarSupport ? stdenv.hostPlatform.isUnix,
}:

assert xarSupport -> libxml2 != null;
Expand All @@ -22,7 +24,9 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" ];

nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ sharutils zlib bzip2 openssl xz lzo zstd ]
buildInputs =
stdenv.lib.optional stdenv.hostPlatform.isUnix sharutils
++ [ zlib bzip2 openssl xz lzo zstd ]
++ stdenv.lib.optionals stdenv.isLinux [ e2fsprogs attr acl ]
++ stdenv.lib.optional xarSupport libxml2;

Expand Down
6 changes: 4 additions & 2 deletions pkgs/tools/compression/zstd/default.nix
Expand Up @@ -18,7 +18,7 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ bash ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isUnix bash;

patches = [
./playtests-darwin.patch
Expand Down Expand Up @@ -72,7 +72,9 @@ stdenv.mkDerivation rec {
--replace "zstdcat" "$bin/bin/zstdcat"
'';

outputs = [ "bin" "dev" "man" "out" ];
outputs = [ "bin" "dev" ]
++ stdenv.lib.optional stdenv.hostPlatform.isUnix "man"
++ [ "out" ];

meta = with stdenv.lib; {
description = "Zstandard real-time compression algorithm";
Expand Down