Skip to content

lib.systems.inspect: isEfi → hasEfi rename#263711

Open
RaitoBezarius wants to merge 1 commit intoNixOS:masterfrom
RaitoBezarius:stdenv-efi
Open

lib.systems.inspect: isEfi → hasEfi rename#263711
RaitoBezarius wants to merge 1 commit intoNixOS:masterfrom
RaitoBezarius:stdenv-efi

Conversation

@RaitoBezarius
Copy link
Member

@RaitoBezarius RaitoBezarius commented Oct 27, 2023

This PR offers one change related to EFI improvements required for #231951.

Move away from isEfi meaning "does it have an EFI platform" and onto isEfi (is this EFI system, doesn't exist in this PR yet.) and hasEfi (does it have an EFI platform).

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@RaitoBezarius RaitoBezarius requested a review from a user October 27, 2023 06:26
@github-actions github-actions bot added 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 6.topic: lib The Nixpkgs function library labels Oct 27, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Oct 27, 2023
Copy link
Member

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be missing some context. Maybe the EFI topic should also be explained in doc/stdenv/platform-notes.chapter.md (not sure if there's a better place)

@RaitoBezarius
Copy link
Member Author

This might be missing some context. Maybe the EFI topic should also be explained in doc/stdenv/platform-notes.chapter.md (not sure if there's a better place)

Done.

@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Oct 27, 2023
@RaitoBezarius
Copy link
Member Author

@flokli PTAL.

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 27, 2023
@alyssais
Copy link
Member

Commit messages could be attribute-based: "wrapBintoolsWith: " for the first and "lib.systems.inspect: " for the second.

@RaitoBezarius RaitoBezarius force-pushed the stdenv-efi branch 2 times, most recently from add77ba to b80e6c9 Compare October 27, 2023 10:01
@delroth delroth removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 27, 2023
@RaitoBezarius RaitoBezarius changed the title stdenv: some EFI-related improvements lib.systems.inspect: isEfi → hasEfi rename Oct 27, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Oct 27, 2023
@ofborg ofborg bot removed the 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. label Oct 27, 2023
This was never about "is this a UEFI system", but "does it support potentially a UEFI
environment".

Reflected in the rest of the call sites.
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree on the general idea of the destination; happy to let others figure out the deprecation cycle.

@delroth delroth added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Oct 28, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just get rid of isEfi completely?

EFI (or UEFI) is a property of a specific motherboard, not a CPU or an architecture.

This is only used in two places: systemd and gnu-efi. Frankly it should just be copied into their respective meta.platforms attributes and the isEfi attribute deprecated.

@RaitoBezarius it looks like your #231951 doesn't even use this?

I don't want to drag things out, but if we're going to deprecate isEfi let's not add another misfeature hasEfi that needs to be deprecated in the next cycle...

I'll submit an alternative that just moves this into systemd and gnu-efi. If you all still want to go with this PR, please at least apply the change below.

@ghost
Copy link

ghost commented Oct 30, 2023

Could we just get rid of isEfi completely?

Suggested implementation:

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: lib The Nixpkgs function library 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants