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

packages.json: more subsets #102509

Closed
wants to merge 3 commits into from
Closed

Conversation

Atemu
Copy link
Member

@Atemu Atemu commented Nov 2, 2020

Motivation for this change

#102508

Nix expression used to generate the list:

https://gist.github.com/Atemu/283526e3e8c196107468209068562a7e

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@veprbl
Copy link
Member

veprbl commented Dec 6, 2020

@timokau To answer to #105857 (comment): Yes, this adds a list that would need to be maintained. Even after the selections there are some items that are not sets of installable packages (e.g. texFunctions).

@Atemu
Copy link
Member Author

Atemu commented Dec 7, 2020

adds a list that would need to be maintained

True but I feel like we kind of need a list like this. There is no source for what's a set of packages under pkgs and what isn't. Not good for discoverability; neither automated nor manual.

As @garbas mentioned though, ideally this would be resolved at the root: Perhaps such a list should be the very place in which package subsets are defined.

What if we moved packages subsets out of all-packages, into a new "subsets.nix" and then combined back into the current pkgs structure for example? (+ perhaps a new pkgs.subsets)

Even after the selections there are some items that are not sets of installable packages

It'd be better if it was 100% clean of course but having sets with things other than packages in them isn't actually an issue because non-derivations are simply skipped in the JSON generation.

@stale
Copy link

stale bot commented Jul 20, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 20, 2021
@davidak
Copy link
Member

davidak commented Aug 13, 2021

What is the status here?

It would still be great to export every package to packages.json. That is an easy way to make nixpkgs more valuable for users. Packages that are not discoverable do not exist for users!

#105857 was merged because there is no better proposed solution to solve the issue and i think that applies here too. So, can we get it merged?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 13, 2021
@Atemu
Copy link
Member Author

Atemu commented Aug 21, 2021

The problem is not that this is a bad solution, the problem is that this is an unsustainable solution.

We need to enforce a single place where subsets must be declared and perhaps even apply recurseIntoAttrs to all of them.

@Atemu Atemu closed this Aug 21, 2021
@Atemu Atemu deleted the packages.json-more-subsets branch October 7, 2022 18:36
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

4 participants