From eeae457c3beff6b308680180737f236e392e2cf7 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Wed, 16 Feb 2022 17:22:14 -0800 Subject: [PATCH] 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. --- pkgs/os-specific/linux/pam/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 1476ae49006c..72f91e89c745 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;