evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / soundcard / test.nix
blob720e7336cd6afdbeecd0829acd151b48e4b768f0
2   name = "Python Soundcard Library Test";
4   nodes.machine =
5     { pkgs, ... }:
6     {
7       environment.systemPackages = [ (pkgs.python3.withPackages (ps: [ ps.soundcard ])) ];
9       hardware.pulseaudio.enable = true;
10       hardware.pulseaudio.systemWide = true;
12       virtualisation.qemu.options = [
13         "-device virtio-sound-pci,audiodev=my_audiodev"
14         "-audiodev wav,id=my_audiodev"
15       ];
16     };
18   interactive.nodes.machine =
19     { ... }:
20     {
21       services.openssh.enable = true;
22       services.openssh.settings.PermitRootLogin = "yes";
23       users.extraUsers.root.initialPassword = "";
24       users.extraUsers.root.hashedPassword = null;
25       users.extraUsers.root.hashedPasswordFile = null;
26       users.extraUsers.root.initialHashedPassword = null;
27       virtualisation.forwardPorts = [
28         {
29           from = "host";
30           host.port = 2222;
31           guest.port = 22;
32         }
33       ];
34     };
36   testScript =
37     let
38       script = builtins.toFile "import.py" ''
39         import soundcard
40       '';
41     in
42     ''
43       start_all()
44       machine.wait_for_unit("multi-user.target")
45       machine.succeed("python ${script}")
46     '';