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

libarchive: make static patch unconditional #249269

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions pkgs/development/libraries/libarchive/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let
autoreconfHook = buildPackages.autoreconfHook269;
in
assert xarSupport -> libxml2 != null;
(stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "libarchive";
version = "3.6.2";

Expand All @@ -43,6 +43,16 @@ assert xarSupport -> libxml2 != null;

outputs = [ "out" "lib" "dev" ];

patches = [
# fixes static linking; upstream in releases after 3.6.2
# https://github.com/libarchive/libarchive/pull/1825 merged upstream
(assert finalAttrs.version == "3.6.2"; fetchpatch {
name = "001-only-add-iconv-to-pc-file-if-needed.patch";
url = "https://github.com/libarchive/libarchive/commit/1f35c466aaa9444335a1b854b0b7223b0d2346c2.patch";
hash = "sha256-lb+zwWSH6/MLUIROvu9I/hUjSbb2jOWO755WC/r+lbY=";
})
];

postPatch = let
skipTestPaths = [
# test won't work in nix sandbox
Expand Down Expand Up @@ -119,16 +129,4 @@ assert xarSupport -> libxml2 != null;
passthru.tests = {
inherit cmake nix samba;
};
})).overrideAttrs(previousAttrs:
assert previousAttrs.version == "3.6.2";
lib.optionalAttrs stdenv.hostPlatform.isStatic {
patches = [
# fixes static linking; upstream in releases after 3.6.2
# https://github.com/libarchive/libarchive/pull/1825 merged upstream
(fetchpatch {
name = "001-only-add-iconv-to-pc-file-if-needed.patch";
url = "https://github.com/libarchive/libarchive/commit/1f35c466aaa9444335a1b854b0b7223b0d2346c2.patch";
hash = "sha256-lb+zwWSH6/MLUIROvu9I/hUjSbb2jOWO755WC/r+lbY=";
})
];
})
})