Skip to content

[wip] create maintainers/categories-set.nix#230439

Closed
AndersonTorres wants to merge 8 commits intoNixOS:masterfrom
atorres1985-contrib:rfc146-meta-categories
Closed

[wip] create maintainers/categories-set.nix#230439
AndersonTorres wants to merge 8 commits intoNixOS:masterfrom
atorres1985-contrib:rfc146-meta-categories

Conversation

@AndersonTorres
Copy link
Copy Markdown
Member

As a proof-of-concept for NixOS/rfcs#146

Description of changes
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
  • Fits CONTRIBUTING.md.

@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 May 7, 2023
@7c6f434c
Copy link
Copy Markdown
Member

I guess what is needed is also adding category to the meta attribute whitelist?

@AndersonTorres
Copy link
Copy Markdown
Member Author

Isn't this an ofborg-specific config?

@7c6f434c
Copy link
Copy Markdown
Member

There is a list in the manual, and there is stdenv/generic/check-meta.nix

@github-actions github-actions bot added 6.topic: lib The Nixpkgs function library 8.has: documentation This PR adds or changes documentation 6.topic: stdenv Standard environment labels Jul 29, 2023
@AndersonTorres
Copy link
Copy Markdown
Member Author

Here is the current listing of files inside pkgs directory. They can be useful for filling the categories set.

listagem.txt

@AndersonTorres AndersonTorres self-assigned this Jul 29, 2023
@AndersonTorres
Copy link
Copy Markdown
Member Author

@7c6f434c can you please check this again?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
The categories of the package. A list of attributes from the attribute set defined in [`nixpkgs/lib/categories-set.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/categories-set.nix).
The `meta.categories` attribute contains the categories of the package. A list of attributes from the attribute set defined in [`nixpkgs/lib/categories-set.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/categories-set.nix).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I still think the attribute name should be made explicit like in other entries.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can you explain? I'm not understanding.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some sections are titled with exact (including capitalisation) name of the meta attribute. Some sections include the full name in the text near the beginning. Some do both.

The proposed section here does neither, thus my suggestion to add meta.categories into the text of the section.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@AndersonTorres
Copy link
Copy Markdown
Member Author

@7c6f434c what do you think of the example of xa assembler given above?

@7c6f434c
Copy link
Copy Markdown
Member

I think it works fine as an example, but it feels a bit weird to add specifically «assembler» and not «compiler»

@AndersonTorres
Copy link
Copy Markdown
Member Author

AndersonTorres commented Aug 10, 2023

I think it works fine as an example, but it feels a bit weird to add specifically «assembler» and not «compiler»

Well, the idea is that meta.categories allows to be more specific when compared with filesystem classification.
xa is an assembler, not a compiler.

OK, assemblers are compilers in a broader sense; however, this would be a case for relatedCategories (in the example, development).

Also, it shows the basic ideas of the data structure.

@7c6f434c
Copy link
Copy Markdown
Member

«assembler → compiler → development» maybe with the transitive «assembler → development» would look natural (with the implication that we don't fill everything, it is just a demonstration), or as you proposed initially «audio → audioVideo» and tag some minor sound processing application like snd.

@AndersonTorres
Copy link
Copy Markdown
Member Author

I suggest, then, to never fill the "transitive closure" of every category, in the sense of e.g. assembler.relatedCategories is not filled with compiler.relatedCategories.

@AndersonTorres
Copy link
Copy Markdown
Member Author

Now it should work as a POC

Copy link
Copy Markdown
Member

@7c6f434c 7c6f434c left a comment

Choose a reason for hiding this comment

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

(We will obviously need a bit more process documentation in the manual, but this will need to take into account the choices made in the RFC process)

@7c6f434c
Copy link
Copy Markdown
Member

Speaking of base categories, one thing definitionally not covered by Freedesktop is «data assets» — fonts, themes, icon packs, game levels (e.g. when the core is built on Hydra and unpacking a gigabyte of 3D models has empty hydraPlatforms), and other things one doesn't launch from an application menu.

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@AndersonTorres
Copy link
Copy Markdown
Member Author

check-meta conflicted, closing.

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 6.topic: lib The Nixpkgs function library 6.topic: stdenv Standard environment 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants