···521521>
522522> See [Versioning](#versioning) for details on package versioning.
523523524524+The following describes two ways to include the patch. Regardless of how the patch is included, you _must_ ensure its purpose is clear and obvious. This enables other maintainers to more easily determine when old patches are no longer required. Typically, you can improve clarity with carefully considered filenames, attribute names, and/or comments; these should explain the patch's _intention_. Additionally, it may sometimes be helpful to clarify _how_ it resolves the issue. For example: _"fix gcc14 build by adding missing include"_.
525525+524526### Fetching patches
525527526528In the interest of keeping our maintenance burden and the size of Nixpkgs to a minimum, patches already merged upstream or published elsewhere _should_ be retrieved using `fetchpatch2`:
···55import sys
66from pathlib import Path
77from subprocess import CalledProcessError, run
88-from textwrap import dedent
98from typing import Final, assert_never
1091110from . import nix, tmpdir
···338337 )
339338340339341341-def validate_nixos_config(path_to_config: Path) -> None:
342342- if not (path_to_config / "nixos-version").exists() and not os.environ.get(
343343- "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM"
344344- ):
345345- msg = dedent(
346346- # the lowercase for the first letter below is proposital
347347- f"""
348348- your NixOS configuration path seems to be missing essential files.
349349- To avoid corrupting your current NixOS installation, the activation will abort.
350350-351351- This could be caused by Nix bug: https://github.com/NixOS/nix/issues/13367.
352352- This is the evaluated NixOS configuration path: {path_to_config}.
353353- Change the directory to somewhere else (e.g., `cd $HOME`) before trying again.
354354-355355- If you think this is a mistake, you can set the environment variable
356356- NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM to 1
357357- and re-run the command to continue.
358358- Please open an issue if this is the case.
359359- """
360360- ).strip()
361361- raise NixOSRebuildError(msg)
362362-363363-364340def execute(argv: list[str]) -> None:
365341 args, args_groups = parse_args(argv)
366342···514490 copy_flags=copy_flags,
515491 )
516492 if action in (Action.SWITCH, Action.BOOT):
517517- validate_nixos_config(path_to_config)
518493 nix.set_profile(
519494 profile,
520495 path_to_config,
···99from pathlib import Path
1010from string import Template
1111from subprocess import PIPE, CalledProcessError
1212+from textwrap import dedent
1213from typing import Final, Literal
13141415from . import tmpdir
···613614 sudo: bool,
614615) -> None:
615616 "Set a path as the current active Nix profile."
617617+ if not os.environ.get(
618618+ "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM"
619619+ ):
620620+ r = run_wrapper(
621621+ ["test", "-f", path_to_config / "nixos-version"],
622622+ remote=target_host,
623623+ check=False,
624624+ )
625625+ if r.returncode:
626626+ msg = dedent(
627627+ # the lowercase for the first letter below is proposital
628628+ f"""
629629+ your NixOS configuration path seems to be missing essential files.
630630+ To avoid corrupting your current NixOS installation, the activation will abort.
631631+632632+ This could be caused by Nix bug: https://github.com/NixOS/nix/issues/13367.
633633+ This is the evaluated NixOS configuration path: {path_to_config}.
634634+ Change the directory to somewhere else (e.g., `cd $HOME`) before trying again.
635635+636636+ If you think this is a mistake, you can set the environment variable
637637+ NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM to 1
638638+ and re-run the command to continue.
639639+ Please open an issue if this is the case.
640640+ """
641641+ ).strip()
642642+ raise NixOSRebuildError(msg)
643643+616644 run_wrapper(
617645 ["nix-env", "-p", profile.path, "--set", path_to_config],
618646 remote=target_host,
···15621562 ''; # Added 2025-03-07
15631563 poretools = throw "poretools has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-06-03
15641564 powerdns = pdns; # Added 2022-03-28
15651565+ presage = throw "presage has been removed, as it has been unmaintained since 2018"; # Added 2024-03-24
15651566 projectm = throw "Since version 4, 'projectm' has been split into 'libprojectm' (the library) and 'projectm-sdl-cpp' (the SDL2 frontend). ProjectM 3 has been moved to 'projectm_3'"; # Added 2024-11-10
1566156715671568 cstore_fdw = postgresqlPackages.cstore_fdw;