Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

libarchive: make static patch unconditional

Cabal 3.8 has the same requirements as pkgsStatic even when linking
dynamically, so this patch will be useful for compiling
haskellPackages.libarchive.

https://github.com/haskell/cabal/issues/8455

authored by sternenseemann and committed by Anderson Torres fa8eefef 8398c6ff

+12 -14
+12 -14
pkgs/development/libraries/libarchive/default.nix
··· 30 30 autoreconfHook = buildPackages.autoreconfHook269; 31 31 in 32 32 assert xarSupport -> libxml2 != null; 33 - (stdenv.mkDerivation (finalAttrs: { 33 + stdenv.mkDerivation (finalAttrs: { 34 34 pname = "libarchive"; 35 35 version = "3.6.2"; 36 36 ··· 42 42 }; 43 43 44 44 outputs = [ "out" "lib" "dev" ]; 45 + 46 + patches = [ 47 + # fixes static linking; upstream in releases after 3.6.2 48 + # https://github.com/libarchive/libarchive/pull/1825 merged upstream 49 + (assert finalAttrs.version == "3.6.2"; fetchpatch { 50 + name = "001-only-add-iconv-to-pc-file-if-needed.patch"; 51 + url = "https://github.com/libarchive/libarchive/commit/1f35c466aaa9444335a1b854b0b7223b0d2346c2.patch"; 52 + hash = "sha256-lb+zwWSH6/MLUIROvu9I/hUjSbb2jOWO755WC/r+lbY="; 53 + }) 54 + ]; 45 55 46 56 postPatch = let 47 57 skipTestPaths = [ ··· 119 129 passthru.tests = { 120 130 inherit cmake nix samba; 121 131 }; 122 - })).overrideAttrs(previousAttrs: 123 - assert previousAttrs.version == "3.6.2"; 124 - lib.optionalAttrs stdenv.hostPlatform.isStatic { 125 - patches = [ 126 - # fixes static linking; upstream in releases after 3.6.2 127 - # https://github.com/libarchive/libarchive/pull/1825 merged upstream 128 - (fetchpatch { 129 - name = "001-only-add-iconv-to-pc-file-if-needed.patch"; 130 - url = "https://github.com/libarchive/libarchive/commit/1f35c466aaa9444335a1b854b0b7223b0d2346c2.patch"; 131 - hash = "sha256-lb+zwWSH6/MLUIROvu9I/hUjSbb2jOWO755WC/r+lbY="; 132 - }) 133 - ]; 134 - }) 132 + })