Merge pull request #247443 from amjoseph-nixpkgs/pr/openssh/withPAM

This commit is contained in:
Artturi
2023-08-28 21:45:48 +03:00
committed by GitHub
+3 -2
View File
@@ -28,6 +28,7 @@
, hostname
, nixosTests
, withFIDO ? stdenv.hostPlatform.isUnix && !stdenv.hostPlatform.isMusl
, withPAM ? stdenv.hostPlatform.isLinux
, linkOpenssl ? true
}:
@@ -71,7 +72,7 @@ stdenv.mkDerivation {
buildInputs = [ zlib openssl libedit ]
++ lib.optional withFIDO libfido2
++ lib.optional withKerberos libkrb5
++ lib.optional stdenv.isLinux pam;
++ lib.optional withPAM pam;
preConfigure = ''
# Setting LD causes `configure' and `make' to disagree about which linker
@@ -88,7 +89,7 @@ stdenv.mkDerivation {
"--with-mantype=man"
"--with-libedit=yes"
"--disable-strip"
(if stdenv.isLinux then "--with-pam" else "--without-pam")
(lib.withFeature withPAM "pam")
] ++ lib.optional (etcDir != null) "--sysconfdir=${etcDir}"
++ lib.optional withFIDO "--with-security-key-builtin=yes"
++ lib.optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}")