diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-12-01 15:19:27 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-12-01 15:19:27 +0000 |
commit | 7576688040b1116f1ec351f09f3b049c74ca4e7c (patch) | |
tree | 80bd8eaf50f5b823c75b99213911c15b545fb293 /pkgs/tools/archivers/cpio/default.nix | |
parent | 3ca25cf8852f17a0d76aebdf7a507ffc8d573969 (diff) |
cpio: pull upstream fix for clang-16
WIthout the change build against `clang-16` and upcoming `gcc-14` fails as: $ nix build --impure --expr 'with import ./. {}; cpio.override { stdenv = clangStdenv; }' -L ... cpio> checking return type of major()... configure: error: cannot determine type
Diffstat (limited to 'pkgs/tools/archivers/cpio/default.nix')
-rw-r--r-- | pkgs/tools/archivers/cpio/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix index 1b766fed14924..4116a0b3e4ca8 100644 --- a/pkgs/tools/archivers/cpio/default.nix +++ b/pkgs/tools/archivers/cpio/default.nix @@ -1,6 +1,8 @@ { lib , stdenv , fetchurl +, fetchpatch +, autoreconfHook # for passthru.tests , git @@ -18,6 +20,17 @@ stdenv.mkDerivation rec { sha256 = "/NwV1g9yZ6b8fvzWudt7bIlmxPL7u5ZMJNQTNv0/LBI="; }; + patches = [ + # Pull upstream fix for clang-16 and gcc-14. + (fetchpatch { + name = "major-decl.patch"; + url = "https://git.savannah.gnu.org/cgit/cpio.git/patch/?id=8179be21e664cedb2e9d238cc2f6d04965e97275"; + hash = "sha256-k5Xiv3xuPU8kPT6D9B6p+V8SK55ybFgrIIPDgHuorpM="; + }) + ]; + + nativeBuildInputs = [ autoreconfHook ]; + separateDebugInfo = true; preConfigure = lib.optionalString stdenv.isCygwin '' |