From 9a35d5091dbde558f92ea9f3853f979a28b16447 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sun, 2 Aug 2026 05:24:15 -0700 Subject: [PATCH] nixos/limine: don't read all of /nix/store during installation The installer being placed directly at (e.g.) /nix/store/272h8d4df6by64ycl3s01bixrcaq5a9a-limine-install.py causes Python to search the script's directory for imports if -P is not added, so add -P to avoid Python automatically adding /nix/store to the script's sys.path. From the python manpage: > -P: Don't automatically prepend a potentially unsafe path to sys.path > such as the current directory, the script's directory or an empty string. > See also the PYTHONSAFEPATH environment variable. (cherry picked from commit 764a4ebdf25b051f3e937840e1c60526c9f0a0ea) --- nixos/modules/system/boot/loader/limine/limine-install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/limine/limine-install.py b/nixos/modules/system/boot/loader/limine/limine-install.py index 7b2e263e401e..4c9db91ad65d 100644 --- a/nixos/modules/system/boot/loader/limine/limine-install.py +++ b/nixos/modules/system/boot/loader/limine/limine-install.py @@ -1,4 +1,4 @@ -#!@python3@/bin/python3 -B +#!@python3@/bin/python3 -BP from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional, Tuple