about summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2024-05-17 01:31:46 +0100
committerGitHub <noreply@github.com>2024-05-17 01:31:46 +0100
commit402031bfe65dba24a9ea6ebb27a1b0bff94feb10 (patch)
tree51d92e4866b0c9c2d717f6ce6f4a621a07c0b656 /pkgs/tools/networking
parentea77cefecb0ab07e61d6bde3e24c7ae6820b96d5 (diff)
parent54a3d44e24b8b966dbcc7608b2c4c8d7acbc83ae (diff)
Merge pull request #308325 from wlcx/openssh-passwd
openssh: build with correct passwd path
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/openssh/common.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix
index 5c7b3ecb1d355..d5f658641efd8 100644
--- a/pkgs/tools/networking/openssh/common.nix
+++ b/pkgs/tools/networking/openssh/common.nix
@@ -33,6 +33,7 @@
 , withPAM ? stdenv.hostPlatform.isLinux
 , dsaKeysSupport ? false
 , linkOpenssl ? true
+, isNixos ? stdenv.hostPlatform.isLinux
 }:
 
 stdenv.mkDerivation {
@@ -77,6 +78,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 = [