summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2025-06-19 20:29:23 +0100
committerThiago Kenji Okada <thiagokokada@gmail.com>2025-06-19 23:51:48 +0100
commit0dce56f3f52ee767c6d7aa816675d33c1c12a630 (patch)
tree8541bbe35c3e388d59362cb4a55dd0bdcdb1c1b3 /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
parent2576cf9ca3c4a174b6ef06d13805868573bca250 (diff)
nixos-rebuild-ng: validate NixOS configuration path
When `path://` or `git+file://` protocol is used in Flake mode (that is the most common case since we normalize the paths, see PR #375493) and the current working directory in a symlink pointing base store path to the Nix store (e.g., /run/opengl-driver/lib), there is a nasty bug where Nix resolves the path as the Nix store path of the current derivation instead of the target derivation. Since we blindly activate this path, this can corrupt the installation and break some other activation scripts, like `systemd-boot-builder.py`. While it is possible to recover this situation using `nix-env -p /nix/var/nix/profiles/system --delete-generations old`, this is far from ideal. This commit solves it by validating that the resolved NixOS configuration path includes at least `$out/nixos-version`. I am not sure if this is going to break some cases so there is a escape hatch in the form of the environment variable `NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM`, but in general it looks safe.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions