From 0de27edfbf2c8fe73832ef8482977a7555b5ebcf Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Wed, 6 Aug 2025 23:36:09 -0400 Subject: [PATCH] openssh: remove softhsm ref when cross-compiling softhsm is used for tests, which don't run when cross-compiling, but it was accidentally included anyway due to a mistake in the preCheck conditionals. This fixes the cross build on armv6l. --- pkgs/tools/networking/openssh/common.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix index 67b850d55a9b..ccf4964539cc 100644 --- a/pkgs/tools/networking/openssh/common.nix +++ b/pkgs/tools/networking/openssh/common.nix @@ -146,8 +146,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!stdenv.hostPlatform.isDarwin) hostname ++ lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isMusl) softhsm; - preCheck = - lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + preCheck = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ( + '' # construct a dummy HOME export HOME=$(realpath ../dummy-home) mkdir -p ~/.ssh @@ -197,7 +197,8 @@ stdenv.mkDerivation (finalAttrs: { # The extra tests check PKCS#11 interactions, which softhsm emulates with software only substituteInPlace regress/test-exec.sh \ --replace /usr/local/lib/softhsm/libsofthsm2.so ${lib.getLib softhsm}/lib/softhsm/libsofthsm2.so - ''; + '' + ); # integration tests hard to get working on darwin with its shaky # sandbox # t-exec tests fail on musl