nixos/virtualisation/podman: fix negated logic

- !stdenv.buildPlatform.canExecute stdenv.hostPlatform is incorrect.

- Example: buildPlatform = x86_64, hostPlatform = aarch64, x86_64 cannot
  execute (without emulation) aarch64 so this results in !false, which
  is true. This means that the optional string is inserted and x86_64
  will try to run aarch64 docker.
This commit is contained in:
magicquark
2025-12-06 06:09:42 +00:00
parent 4bf849b1f3
commit 2d293c04db
@@ -35,7 +35,7 @@ let
ln -s $f $man/share/man/man1/$basename
done
''
+ lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
export HOME=$(mktemp -d) # work around `docker <cmd>`
installShellCompletion --cmd docker \
--bash <($out/bin/docker completion bash) \