Skip to content

Commit

Permalink
nixos/qemu-vm: support nix run
Browse files Browse the repository at this point in the history
  • Loading branch information
worldofpeace committed Sep 6, 2020
1 parent e6cbcc2 commit 02590c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/qemu-vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ in

services.qemuGuest.enable = cfg.qemu.guestAgent.enable;

system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; }
system.build.vm = pkgs.runCommand "run-${config.system.name}-vm" { preferLocalBuild = true; }
''
mkdir -p $out/bin
ln -s ${config.system.build.toplevel} $out/system
Expand Down

2 comments on commit 02590c9

@pbogdan
Copy link
Member

@pbogdan pbogdan commented on 02590c9 Sep 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This somehow broke NixOS tests, they are failing with:

starting VDE switch for network 1
/nix/store/685kq8pyhrvajah1hdsfn4q7gm3j4yd4-python3-3.8.5/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/nix/store/685kq8pyhrvajah1hdsfn4q7gm3j4yd4-python3-3.8.5/lib/python3.8/subprocess.py:849: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stderr = io.open(errread, 'rb', bufsize)
machine-vm/bin/run-machine: delete the VM state directory
Traceback (most recent call last):
  File "/nix/store/b16xwvxysgzxf2cv815qsinjlmhmpn0m-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 950, in <module>
    exec("\n".join(machine_eval))
  File "<string>", line 1
SyntaxError: cannot assign to operator

Reverting this commit fixes the issue.

@worldofpeace
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really really weird. Will revert and look into it

Please sign in to comment.