From 4bf849b1f3e6a266b618d95cfa6eedae8ac7ae2e Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:22:20 +0000 Subject: [PATCH] nixos/virtualisation/podman: fix broken evaluation - The following error occurs when building: error: A definition for option `environment.systemPackages."[definition 8-entry 2]"' is not of type `package'. Definition values: - In `/nix/store/dgp9wmspgm6zhl66f0c81rvg3v7wwbsb-source/nixos/modules/virtualisation/podman/default.nix': '' /nix/store/yyspp8pf5fhpx17wb2ndrhdd7y5kqb4g-podman-docker-compat-5.7.0export HOME=$(mktemp -d) # work around `docker ` installShellCompletion --cmd docker \ --bash <($out/bin/docker completion bash) \ --zsh <($out/bin/docker completion zsh) \ - This error occurs because the string is being concatenated to the output of the function evaluation of `pkgs.runCommand` instead of being concatenated to the string input of the function. - Tested locally and the build works again. --- .../modules/virtualisation/podman/default.nix | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index 5f01142b4a13..df5d3e27acfb 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -24,23 +24,25 @@ let inherit (cfg.package) meta; preferLocalBuild = true; } - '' - mkdir -p $out/bin - ln -s ${cfg.package}/bin/podman $out/bin/docker + ( + '' + mkdir -p $out/bin + ln -s ${cfg.package}/bin/podman $out/bin/docker - mkdir -p $man/share/man/man1 - for f in ${cfg.package.man}/share/man/man1/*; do - basename=$(basename $f | sed s/podman/docker/g) - ln -s $f $man/share/man/man1/$basename - done - '' - + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - export HOME=$(mktemp -d) # work around `docker ` - installShellCompletion --cmd docker \ - --bash <($out/bin/docker completion bash) \ - --zsh <($out/bin/docker completion zsh) \ - --fish <($out/bin/docker completion fish) - ''; + mkdir -p $man/share/man/man1 + for f in ${cfg.package.man}/share/man/man1/*; do + basename=$(basename $f | sed s/podman/docker/g) + ln -s $f $man/share/man/man1/$basename + done + '' + + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + export HOME=$(mktemp -d) # work around `docker ` + installShellCompletion --cmd docker \ + --bash <($out/bin/docker completion bash) \ + --zsh <($out/bin/docker completion zsh) \ + --fish <($out/bin/docker completion fish) + '' + ); in {