From fc141a889d05b05719f6b70f617cc500beea3c38 Mon Sep 17 00:00:00 2001 From: Kasper Date: Thu, 15 Apr 2021 23:18:51 +0200 Subject: [PATCH] libselinux: fix build with musl (#119472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kasper GaƂkowski Co-authored-by: Sandro --- pkgs/os-specific/linux/libselinux/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index 2c9239b2e7d8..fbf7e4bd995a 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -44,6 +44,11 @@ stdenv.mkDerivation rec { "PYTHONLIBDIR=$(py)/${python3.sitePackages}" ]; + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace src/procattr.c \ + --replace "#include " "" + ''; + preInstall = optionalString enablePython '' mkdir -p $py/${python3.sitePackages}/selinux '';