openssh: build with correct passwd path

This commit is contained in:
Sam Willcocks
2024-05-16 17:42:17 +01:00
parent 4e1544bf0d
commit 54a3d44e24
+7
View File
@@ -32,6 +32,7 @@
, withPAM ? stdenv.hostPlatform.isLinux
, dsaKeysSupport ? false
, linkOpenssl ? true
, isNixos ? stdenv.hostPlatform.isLinux
}:
stdenv.mkDerivation {
@@ -75,6 +76,12 @@ stdenv.mkDerivation {
unset LD
'';
env = lib.optionalAttrs isNixos {
# openssh calls passwd to allow the user to reset an expired password, but nixos
# doesn't ship it at /usr/bin/passwd.
PATH_PASSWD_PROG = "/run/wrappers/bin/passwd";
};
# I set --disable-strip because later we strip anyway. And it fails to strip
# properly when cross building.
configureFlags = [