From 4d4bad8ae5a433993d1b4c32d374bfb985b46223 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 9 Feb 2026 22:27:29 +0100 Subject: [PATCH] edk2-uefi-shell: move env variable(s) into env for structuredAttrs --- pkgs/by-name/ed/edk2-uefi-shell/package.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ed/edk2-uefi-shell/package.nix b/pkgs/by-name/ed/edk2-uefi-shell/package.nix index 8853243cc597..47ad2e5196b2 100644 --- a/pkgs/by-name/ed/edk2-uefi-shell/package.nix +++ b/pkgs/by-name/ed/edk2-uefi-shell/package.nix @@ -23,16 +23,17 @@ edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: { ]; strictDeps = true; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.cc.isClang [ + env = { + # Set explicitly to use Python 3 from nixpkgs. Otherwise, the build system will detect and try to + # use `/usr/bin/python3` on Darwin when sandboxing is disabled. + PYTHON_COMMAND = "${lib.getBin pkgsBuildHost.python3}/bin/python3"; + } + // lib.optionalAttrs stdenv.cc.isClang { + NIX_CFLAGS_COMPILE = toString [ "-fno-pic" "-Qunused-arguments" - ] - ); - - # Set explicitly to use Python 3 from nixpkgs. Otherwise, the build system will detect and try to - # use `/usr/bin/python3` on Darwin when sandboxing is disabled. - PYTHON_COMMAND = "${lib.getBin pkgsBuildHost.python3}/bin/python3"; + ]; + }; # We only have a .efi file in $out which shouldn't be patched or stripped dontPatchELF = true;