Skip to content

meta: replace predicates with pattern over elaborated platform#212939

Merged
flokli merged 8 commits intomasterfrom
unknown repository
Jan 30, 2023
Merged

meta: replace predicates with pattern over elaborated platform#212939
flokli merged 8 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 27, 2023

Description of changes

Putting functions in meta.badPlatforms is, well, bad.

I worried about this a bit, and then it became problematic sooner than I expected it would.

This removes the ability to put functions in meta.badPlatforms (closes #212925).

In order to preserve the ability to use isStatic there, it expands meta.platformMatch to allow matching over the entire (elaborated) hostPlatform rather than just hostPlatform.parsed.

cc:

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: stdenv Standard environment 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. labels Jan 27, 2023
Copy link
Copy Markdown
Member

@ncfavier ncfavier left a comment

Choose a reason for hiding this comment

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

Seems reasonable enough

Adam Joseph and others added 3 commits January 27, 2023 11:16
Co-authored-by: Naïm Favier <n@monade.li>
Co-authored-by: Naïm Favier <n@monade.li>
Co-authored-by: Naïm Favier <n@monade.li>
@ghost ghost marked this pull request as ready for review January 27, 2023 11:18
@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. labels Jan 27, 2023
Co-authored-by: Naïm Favier <n@monade.li>
@alyssais
Copy link
Copy Markdown
Member

alyssais commented Jan 28, 2023

I'm basically resigned to not being able to put isStatic into platforms/badPlatforms at this point, so this is fine with me. Would be cool if we could figure out how to express it as a pattern though. Oh wait, you did! Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: stdenv Standard environment 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isStatic has no non-function representation, but nix-env --meta assumes one exists

3 participants