-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edk2-uefi-shell: fix build when sandboxing is disabled on x86_64-darwin #201095
Conversation
Result of 1 package built:
|
Still working on linux, can't test darwin change but it makes sense. |
@ofborg build edk2-uefi-shell |
I ran
Result of 1 package built:
|
x86_64-darwin:
|
I’m not able to reproduce the failure on either my aarch64-darwin machine under Rosetta 2 or on a native x86_64-darwin machine. I even deleted Xcode from the other machine to make sure it wasn’t being picked up accidentally when sandboxing is disabled. OfBorg shows both a failing build and a succeeding one. |
@ofborg build edk2-uefi-shell |
I'm definitely out of my depth here but would it make sense to merge this as is and see what happens on hydra, in case the ofborg fails are not going to happen there? |
I wish I understood why OfBorg was failing in one case but not the other. I’m fine with merging and seeing what happens, though I suppose that’s not exactly a great practice. |
This sounds like an improvement to purity at least (when sandboxing is off). |
... and fixed on Hydra: https://hydra.nixos.org/job/nixpkgs/trunk/edk2-uefi-shell.x86_64-darwin/all |
This seems to break cross. Should be diff --git a/pkgs/by-name/ed/edk2-uefi-shell/package.nix b/pkgs/by-name/ed/edk2-uefi-shell/package.nix
index 723833ab45cf..eb5b4cd06ea7 100644
--- a/pkgs/by-name/ed/edk2-uefi-shell/package.nix
+++ b/pkgs/by-name/ed/edk2-uefi-shell/package.nix
@@ -5,6 +5,7 @@
, util-linux
, nasm
, python3
+, pkgsBuildHost
}:
edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: {
pname = "edk2-uefi-shell";
@@ -18,7 +19,7 @@ edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: {
# 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 python3}/bin/python3";
+ 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; IMO |
Wait this PR is from 2022... but I think the fix above is still valid. Let me bisect what exactly broke with edk2-uefi-shell... |
Bisected to bef3f40, I guess the new version somehow exposed this issue? Anyway, I will stop spamming this old PR now and submit the fix. |
This PYTHON_COMMAND workaround was introduced in NixOS#201095, but it does not seem to have caused issues so far, until the version update in bef3f40. Not sure why this was not an issue before this update and why it is now, but I think this fix makes sense regardless of the exact root cause, and I don't think it's worth the effort to dig further.
This PYTHON_COMMAND workaround was introduced in NixOS#201095, but it does not seem to have caused issues so far, until the version update in bef3f40. Not sure why this was not an issue before this update and why it is now, but I think this fix makes sense regardless of the exact root cause, and I don't think it's worth the effort to dig further.
This PYTHON_COMMAND workaround was introduced in #201095, but it does not seem to have caused issues so far, until the version update in bef3f40. Not sure why this was not an issue before this update and why it is now, but I think this fix makes sense regardless of the exact root cause, and I don't think it's worth the effort to dig further.
Description of changes
The build still fails on Hydra because sandboxing is disabled. This is due to the build system’s trying to use the system-provided Python 3, which requires Xcode. Specify the path to the nixpkg Python 3, so that doesn’t happen.
ZHF: #199919
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes