Skip to content

Commit

Permalink
Merge pull request #212540 from amjoseph-nixpkgs/pr/libarchive/unbrea…
Browse files Browse the repository at this point in the history
…k-static

libarchive: backport fix for static linking
  • Loading branch information
wegank authored Jan 26, 2023
2 parents 50a4314 + 201148d commit 08bb609
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pkgs/development/libraries/libarchive/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, acl
, attr
, autoreconfHook
Expand Down Expand Up @@ -29,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 Down Expand Up @@ -118,4 +119,16 @@ stdenv.mkDerivation (finalAttrs: {
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=";
})
];
})

0 comments on commit 08bb609

Please sign in to comment.