about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pam
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2022-02-16 17:22:14 -0800
committerRyan Burns <rtburns@protonmail.com>2022-02-16 17:22:16 -0800
commiteeae457c3beff6b308680180737f236e392e2cf7 (patch)
tree93f65379a88345bbaf5ea7157efd4b09da21aefa /pkgs/os-specific/linux/pam
parentd67ffe7bcb11d76d88e4d0ea66a98162f8cf5de9 (diff)
pam: fix cross-compilation from darwin
audit requires running linux-specific code during the build,
so it cannot be cross-compiled from darwin hosts. So we can only
enable audit support in pam when the buildPlatform is linux.
Diffstat (limited to 'pkgs/os-specific/linux/pam')
-rw-r--r--pkgs/os-specific/linux/pam/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix
index 1476ae49006ce..72f91e89c7454 100644
--- a/pkgs/os-specific/linux/pam/default.nix
+++ b/pkgs/os-specific/linux/pam/default.nix
@@ -20,7 +20,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ flex ]
     ++ lib.optional stdenv.buildPlatform.isDarwin gettext;
 
-  buildInputs = [ cracklib db4 audit ]
+  buildInputs = [ cracklib db4 ]
+    ++ lib.optional stdenv.buildPlatform.isLinux audit
     ++ lib.optional withLibxcrypt libxcrypt;
 
   enableParallelBuilding = true;