diff --git a/pkgs/by-name/sh/shim-unsigned/package.nix b/pkgs/by-name/sh/shim-unsigned/package.nix index 96ded033bea1..62f0ce0e4124 100644 --- a/pkgs/by-name/sh/shim-unsigned/package.nix +++ b/pkgs/by-name/sh/shim-unsigned/package.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, + fetchpatch2, lib, elfutils, vendorCertFile ? null, @@ -31,6 +32,14 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; + patches = [ + # Fix build with binutils 2.46. + (fetchpatch2 { + url = "https://github.com/rhboot/shim/commit/c4665d282072df2ed8ab6ae1d5fa0de41e5db02f.patch?full_index=1"; + hash = "sha256-0QGqEo5qu3TrG9yqwQLZGuKhgoeReF+RrJzlOVQYDmA="; + }) + ]; + buildInputs = [ elfutils ]; env.NIX_CFLAGS_COMPILE = toString [ "-I${toString elfutils.dev}/include" ];