doas: fix no-pam build with libxcrypt

This commit is contained in:
Cole Helbling 2022-11-01 08:29:45 -07:00
parent b12db0624f
commit aaef5af8b9

View file

@ -3,6 +3,7 @@
, fetchFromGitHub
, bison
, pam
, libxcrypt
, withPAM ? true
, withTimestamp ? true
@ -38,7 +39,9 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ bison ];
buildInputs = [ pam ];
buildInputs = [ ]
++ lib.optional withPAM pam
++ lib.optional (!withPAM) libxcrypt;
meta = with lib; {
description = "Executes the given command as another user";