Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing pypa-build-hook Using pypaBuildPhase Sourcing python-runtime-deps-check-hook Using pythonRuntimeDepsCheckHook Sourcing pypa-install-hook Using pypaInstallPhase Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-namespaces-hook Sourcing python-catch-conflicts-hook.sh Sourcing pytest-check-hook Using pytestCheckPhase Running phase: unpackPhase unpacking source archive /nix/store/qk5qkj46m51z2017mvwp3g7mziwxbdxl-src source root is src setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "src/tests/test_utils.py" Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase no configure script, doing nothing Running phase: buildPhase Executing pypaBuildPhase Creating a wheel... pypa build flags: --no-isolation --outdir dist/ --wheel * Getting build dependencies for wheel... running egg_info creating nixos_rebuild.egg-info writing nixos_rebuild.egg-info/PKG-INFO writing dependency_links to nixos_rebuild.egg-info/dependency_links.txt writing entry points to nixos_rebuild.egg-info/entry_points.txt writing top-level names to nixos_rebuild.egg-info/top_level.txt writing manifest file 'nixos_rebuild.egg-info/SOURCES.txt' reading manifest file 'nixos_rebuild.egg-info/SOURCES.txt' writing manifest file 'nixos_rebuild.egg-info/SOURCES.txt' * Building wheel... running bdist_wheel running build running build_py creating build/lib/nixos_rebuild copying nixos_rebuild/services.py -> build/lib/nixos_rebuild copying nixos_rebuild/nix.py -> build/lib/nixos_rebuild copying nixos_rebuild/models.py -> build/lib/nixos_rebuild copying nixos_rebuild/constants.py -> build/lib/nixos_rebuild copying nixos_rebuild/tmpdir.py -> build/lib/nixos_rebuild copying nixos_rebuild/__init__.py -> build/lib/nixos_rebuild copying nixos_rebuild/utils.py -> build/lib/nixos_rebuild copying nixos_rebuild/elevate.py -> build/lib/nixos_rebuild copying nixos_rebuild/process.py -> build/lib/nixos_rebuild copying nixos_rebuild/__main__.py -> build/lib/nixos_rebuild running egg_info writing nixos_rebuild.egg-info/PKG-INFO writing dependency_links to nixos_rebuild.egg-info/dependency_links.txt writing entry points to nixos_rebuild.egg-info/entry_points.txt writing top-level names to nixos_rebuild.egg-info/top_level.txt reading manifest file 'nixos_rebuild.egg-info/SOURCES.txt' writing manifest file 'nixos_rebuild.egg-info/SOURCES.txt' copying nixos_rebuild/repl.nix.template -> build/lib/nixos_rebuild installing to build/bdist.macosx-14.0-arm64/wheel running install running install_lib creating build/bdist.macosx-14.0-arm64/wheel creating build/bdist.macosx-14.0-arm64/wheel/nixos_rebuild copying build/lib/nixos_rebuild/services.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/nix.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/models.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/constants.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/tmpdir.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/__init__.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/repl.nix.template -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/utils.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/elevate.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/process.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild copying build/lib/nixos_rebuild/__main__.py -> build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild running install_egg_info Copying nixos_rebuild.egg-info to build/bdist.macosx-14.0-arm64/wheel/./nixos_rebuild-0.0.0-py3.14.egg-info running install_scripts creating build/bdist.macosx-14.0-arm64/wheel/nixos_rebuild-0.0.0.dist-info/WHEEL creating '/nix/var/nix/builds/nix-33247-2904730487/src/dist/.tmp-cc6kk7li/nixos_rebuild-0.0.0-py3-none-any.whl' and adding 'build/bdist.macosx-14.0-arm64/wheel' to it adding 'nixos_rebuild/__init__.py' adding 'nixos_rebuild/__main__.py' adding 'nixos_rebuild/constants.py' adding 'nixos_rebuild/elevate.py' adding 'nixos_rebuild/models.py' adding 'nixos_rebuild/nix.py' adding 'nixos_rebuild/process.py' adding 'nixos_rebuild/repl.nix.template' adding 'nixos_rebuild/services.py' adding 'nixos_rebuild/tmpdir.py' adding 'nixos_rebuild/utils.py' adding 'nixos_rebuild-0.0.0.dist-info/METADATA' adding 'nixos_rebuild-0.0.0.dist-info/WHEEL' adding 'nixos_rebuild-0.0.0.dist-info/entry_points.txt' adding 'nixos_rebuild-0.0.0.dist-info/top_level.txt' adding 'nixos_rebuild-0.0.0.dist-info/RECORD' removing build/bdist.macosx-14.0-arm64/wheel Successfully built nixos_rebuild-0.0.0-py3-none-any.whl Finished creating a wheel... Finished executing pypaBuildPhase Running phase: pythonRuntimeDepsCheckHook Executing pythonRuntimeDepsCheck Checking runtime dependencies for nixos_rebuild-0.0.0-py3-none-any.whl Finished executing pythonRuntimeDepsCheck Running phase: installPhase Executing pypaInstallPhase Successfully installed nixos_rebuild-0.0.0-py3-none-any.whl Finished executing pypaInstallPhase Running phase: pythonOutputDistPhase Executing pythonOutputDistPhase Finished executing pythonOutputDistPhase Running phase: fixupPhase checking for references to /nix/var/nix/builds/nix-33247-2904730487/ in /nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11... gzipping man pages under /nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11/share/man/ patching script interpreter paths in /nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11 stripping (with command strip and flags -S) in /nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11/lib /nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11/bin checking for references to /nix/var/nix/builds/nix-33247-2904730487/ in /nix/store/qfhzcxbnvdbndk04r83w0skj4rzzkfm9-nixos-rebuild-ng-26.11-dist... patching script interpreter paths in /nix/store/qfhzcxbnvdbndk04r83w0skj4rzzkfm9-nixos-rebuild-ng-26.11-dist Rewriting #!/nix/store/i9q7np6h9bwa3ps6937lpwarkqw0izbf-python3-3.14.6/bin/python3.14 to #!/nix/store/i9q7np6h9bwa3ps6937lpwarkqw0izbf-python3-3.14.6 wrapping `/nix/store/6zflm8kbjpnak4lkpx8gq2kxh1qapkwa-nixos-rebuild-ng-26.11/bin/nixos-rebuild'... Executing pythonRemoveTestsDir Finished executing pythonRemoveTestsDir Running phase: installCheckPhase no Makefile or custom installCheckPhase, doing nothing Running phase: pythonCatchConflictsPhase Running phase: pythonRemoveBinBytecodePhase Running phase: pythonImportsCheckPhase Executing pythonImportsCheckPhase Running phase: pytestCheckPhase Executing pytestCheckPhase pytest flags: -m pytest -vv ============================= test session starts ============================== platform darwin -- Python 3.14.6, pytest-9.1.1, pluggy-1.6.0 -- /nix/store/i9q7np6h9bwa3ps6937lpwarkqw0izbf-python3-3.14.6/bin/python3.14 cachedir: .pytest_cache rootdir: /nix/var/nix/builds/nix-33247-2904730487/src configfile: pyproject.toml collected 74 items tests/test_elevate.py::test_no_elevator PASSED [ 1%] tests/test_elevate.py::test_sudo_elevator PASSED [ 2%] tests/test_elevate.py::test_sudo_elevator_extra_opts PASSED [ 4%] tests/test_elevate.py::test_run0_elevator PASSED [ 5%] tests/test_elevate.py::test_run0_elevator_remote PASSED [ 6%] tests/test_elevate.py::test_run0_for_target_config PASSED [ 8%] tests/test_elevate.py::test_elevator_kind PASSED [ 9%] tests/test_elevate.py::test_with_prompted_password PASSED [ 10%] tests/test_main.py::test_parse_args_elevate PASSED [ 12%] tests/test_main.py::test_parse_args PASSED [ 13%] tests/test_main.py::test_execute_nix_boot PASSED [ 14%] tests/test_main.py::test_execute_nix_build PASSED [ 16%] tests/test_main.py::test_execute_nix_build_vm PASSED [ 17%] tests/test_main.py::test_execute_nix_build_image_flake PASSED [ 18%] tests/test_main.py::test_execute_nix_switch_flake PASSED [ 20%] tests/test_main.py::test_execute_nix_switch_build_target_host PASSED [ 21%] tests/test_main.py::test_execute_nix_switch_flake_target_host PASSED [ 22%] tests/test_main.py::test_execute_nix_switch_flake_build_host PASSED [ 24%] tests/test_main.py::test_execute_switch_rollback PASSED [ 25%] tests/test_main.py::test_execute_build PASSED [ 27%] tests/test_main.py::test_execute_build_dry_run_build_and_target_remote PASSED [ 28%] tests/test_main.py::test_execute_test_flake PASSED [ 29%] tests/test_main.py::test_execute_test_rollback PASSED [ 31%] tests/test_main.py::test_execute_switch_store_path PASSED [ 32%] tests/test_main.py::test_execute_switch_store_path_target_host PASSED [ 33%] tests/test_models.py::test_build_attr_from_arg PASSED [ 35%] tests/test_models.py::test_build_attr_to_attr PASSED [ 36%] tests/test_models.py::test_flake_parse PASSED [ 37%] tests/test_models.py::test_flake_to_attr PASSED [ 39%] tests/test_models.py::test_flake__str__ PASSED [ 40%] tests/test_models.py::test_flake_resolve_path_if_exists PASSED [ 41%] tests/test_models.py::test_flake_from_arg PASSED [ 43%] tests/test_models.py::test_profile_from_arg PASSED [ 44%] tests/test_models.py::test_grouped_nix_args_flake_build_flags PASSED [ 45%] tests/test_nix.py::test_build PASSED [ 47%] tests/test_nix.py::test_build_flake PASSED [ 48%] tests/test_nix.py::test_build_remote PASSED [ 50%] tests/test_nix.py::test_build_remote_flake PASSED [ 51%] tests/test_nix.py::test_copy_closure PASSED [ 52%] tests/test_nix.py::test_edit PASSED [ 54%] tests/test_nix.py::test_edit_flake PASSED [ 55%] tests/test_nix.py::test_get_build_image_variants PASSED [ 56%] tests/test_nix.py::test_get_build_image_variants_flake PASSED [ 58%] tests/test_nix.py::test_get_nixpkgs_rev PASSED [ 59%] tests/test_nix.py::test_get_generations PASSED [ 60%] tests/test_nix.py::test_get_generations_with_profile PASSED [ 62%] tests/test_nix.py::test_get_generations_from_nix_env PASSED [ 63%] tests/test_nix.py::test_list_generations PASSED [ 64%] tests/test_nix.py::test_diff_closures PASSED [ 66%] tests/test_nix.py::test_repl PASSED [ 67%] tests/test_nix.py::test_repl_flake PASSED [ 68%] tests/test_nix.py::test_rollback PASSED [ 70%] tests/test_nix.py::test_rollback_temporary_profile PASSED [ 71%] tests/test_nix.py::test_set_profile PASSED [ 72%] tests/test_nix.py::test_switch_to_configuration_without_systemd_run PASSED [ 74%] tests/test_nix.py::test_switch_to_configuration_without_systemd_run_env_var PASSED [ 75%] tests/test_nix.py::test_switch_to_configuration_with_systemd_run PASSED [ 77%] tests/test_nix.py::test_upgrade_channels PASSED [ 78%] tests/test_process.py::test_remote_env_shell_argv PASSED [ 79%] tests/test_process.py::test_run_wrapper PASSED [ 81%] tests/test_process.py::test__kill_long_running_ssh_process PASSED [ 82%] tests/test_process.py::test_remote_from_name PASSED [ 83%] tests/test_process.py::test_ssh_default_opts PASSED [ 85%] tests/test_process.py::test_run_wrapper_ssh_default_opts_override PASSED [ 86%] tests/test_process.py::test_ssh_host PASSED [ 87%] tests/test_process.py::test_run_wrapper_run0 PASSED [ 89%] tests/test_process.py::test_custom_sudo_args PASSED [ 90%] tests/test_services.py::test_reexec PASSED [ 91%] tests/test_services.py::test_reexec_flake PASSED [ 93%] tests/test_services.py::test_reexec_skip_if_already_reexec PASSED [ 94%] tests/test_tmpdir.py::test_make_tmpdir FAILED [ 95%] tests/test_utils.py::test_dict_to_flags PASSED [ 97%] tests/test_utils.py::test_remap_dicts PASSED [ 98%] tests/test_utils.py::test_tabulate PASSED [100%] =================================== FAILURES =================================== _______________________________ test_make_tmpdir _______________________________ def test_make_tmpdir() -> None: def assert_tmpdir(tmp: Path) -> None: assert tmp.exists() assert tmp.is_dir() assert len(os.fsencode(str(tmp))) <= MAX_TMPDIR_LENGTH # Basic test: whatever the default system temp dir happens to be. tmpdir = make_tmpdir() tmp = Path(tmpdir.name) assert_tmpdir(tmp) # Test with a short system temp dir. We should use it unmodified. short_tempdir = "/tmp/not-too-long" with tempfile_tempdir(short_tempdir): > tmpdir = make_tmpdir() ^^^^^^^^^^^^^ tests/test_tmpdir.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nixos_rebuild/tmpdir.py:66: in make_tmpdir tmpdir = TemporaryDirectory(prefix=prefix) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /nix/store/i9q7np6h9bwa3ps6937lpwarkqw0izbf-python3-3.14.6/lib/python3.14/tempfile.py:907: in __init__ self.name = mkdtemp(suffix, prefix, dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ suffix = '', prefix = 'nixos-rebuild.', dir = '/tmp/not-too-long' def mkdtemp(suffix=None, prefix=None, dir=None): """User-callable function to create and return a unique temporary directory. The return value is the pathname of the directory. Arguments are as for mkstemp, except that the 'text' argument is not accepted. The directory is readable, writable, and searchable only by the creating user. Caller is responsible for deleting the directory when done with it. """ prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir) names = _get_candidate_names() if output_type is bytes: names = map(_os.fsencode, names) for seq in range(TMP_MAX): name = next(names) file = _os.path.join(dir, prefix + name + suffix) _sys.audit("tempfile.mkdtemp", file) try: > _os.mkdir(file, 0o700) E PermissionError: [Errno 13] Permission denied: '/tmp/not-too-long/nixos-rebuild.dekowpwe' /nix/store/i9q7np6h9bwa3ps6937lpwarkqw0izbf-python3-3.14.6/lib/python3.14/tempfile.py:381: PermissionError ------------------------------ Captured log call ------------------------------- DEBUG nixos_rebuild.tmpdir:tmpdir.py:69 tempdir '' exceeds 45 bytes limit, defaulting to '' instead =========================== short test summary info ============================ FAILED tests/test_tmpdir.py::test_make_tmpdir - PermissionError: [Errno 13] Permission denied: '/tmp/not-too-long/nixos-rebuild.dekowpwe' ========================= 1 failed, 73 passed in 2.40s =========================