Skip to content
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

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

Closed
wants to merge 8 commits into from
Closed

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

wants to merge 8 commits into from

Conversation

AndersonTorres
Copy link
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.

@7c6f434c
Copy link
Member

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

@AndersonTorres
Copy link
Member Author

Isn't this an ofborg-specific config?

@7c6f434c
Copy link
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 6.topic: stdenv Standard environment labels Jul 29, 2023
@AndersonTorres
Copy link
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
Member Author

@7c6f434c can you please check this again?

@@ -244,6 +244,10 @@ Unfree package that cannot be redistributed. You can build it yourself, but you

This package supplies unfree, redistributable firmware. This is a separate value from `unfree-redistributable` because not everybody cares whether firmware is free.

## Categories {#sec-meta-categories}

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
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
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
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
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
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
Member Author

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

@7c6f434c
Copy link
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
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
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
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
Member Author

Now it should work as a POC

Copy link
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
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
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 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants