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

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
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 AndersonTorres force-pushed the rfc146-meta-categories branch 2 times, most recently from 1481d18 to 4907534 Compare August 10, 2023 02:19
@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 AndersonTorres force-pushed the rfc146-meta-categories branch 2 times, most recently from 13efdb0 to 9779b4d Compare August 11, 2023 01:31
@AndersonTorres
Copy link
Member Author

Now it should work as a POC

@AndersonTorres AndersonTorres force-pushed the rfc146-meta-categories branch 2 times, most recently from 58f7d72 to e41bc92 Compare August 21, 2023 11:23
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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants