summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libselinux
diff options
context:
space:
mode:
authorKasper <kasgal@posteo.net>2021-04-15 23:18:51 +0200
committerGitHub <noreply@github.com>2021-04-15 23:18:51 +0200
commitfc141a889d05b05719f6b70f617cc500beea3c38 (patch)
tree808de5846f006032101472930c806683928dbf80 /pkgs/os-specific/linux/libselinux
parent38c8ae9bbed90a0f058f6640b671b8be975b7b70 (diff)
downloadnixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar.gz
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar.bz2
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar.lz
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar.xz
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.tar.zst
nixpkgs-fc141a889d05b05719f6b70f617cc500beea3c38.zip
libselinux: fix build with musl (#119472)
Co-authored-by: Kasper GaƂkowski <kpg@posteo.net>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/os-specific/linux/libselinux')
-rw-r--r--pkgs/os-specific/linux/libselinux/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix
index 2c9239b2e7d..fbf7e4bd995 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 <unistd.h>" ""
+  '';
+
   preInstall = optionalString enablePython ''
     mkdir -p $py/${python3.sitePackages}/selinux
   '';