From 8da4505aa62d1613acd4b87db5f5996a4807151e Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Thu, 16 Jul 2020 23:46:00 +0200 Subject: [PATCH] libapparmor: Fix build with gnumake 4.3 --- pkgs/os-specific/linux/apparmor/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index afb6799fbaf..807ab4fa44b 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -30,7 +30,18 @@ let sha256 = "03nislxccnbxld89giak2s8xa4mdbwscfxbdwhmw5qpvgz08dgwh"; }; + # See This and the + # accompanying application in prePatchCommon should be removed in 2.13.5 + gnumake43Patch = fetchpatch { + url = "https://gitlab.com/apparmor/apparmor/-/merge_requests/465.patch"; + name = "2-23-fix-build-with-make-4.3.patch"; + sha256 = "0xw028iqp69j9mxv0kbwraplgkj5i5djdlgf0anpkc5cdbsf96r9"; + }; + prePatchCommon = '' + patch -p1 < ${gnumake43Patch} + chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh + patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html" substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"