1 import ./make-test-python.nix ({ lib, pkgs, ... }:
3 pythonShebang = pkgs.writeScript "python-shebang" ''
8 bashShebang = pkgs.writeScript "bash-shebang" ''
15 nodes.machine.services.envfs.enable = true;
19 machine.wait_until_succeeds("mountpoint -q /usr/bin/")
21 "PATH=${pkgs.coreutils}/bin /usr/bin/cp --version",
22 # check fallback paths
23 "PATH= /usr/bin/sh --version",
24 "PATH= /usr/bin/env --version",
25 "PATH= test -e /usr/bin/sh",
26 "PATH= test -e /usr/bin/env",
28 "! test -e /usr/bin/cp",
29 # also picks up PATH that was set after execve
31 "PATH=${pkgs.hello}/bin /usr/bin/hello",
34 out = machine.succeed("PATH=${pkgs.python3}/bin ${pythonShebang}")
38 out = machine.succeed("PATH=${pkgs.bash}/bin ${bashShebang}")