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

License Report for installed packages #6040

Open
kaihowl opened this issue Nov 4, 2024 · 0 comments
Open

License Report for installed packages #6040

kaihowl opened this issue Nov 4, 2024 · 0 comments
Assignees

Comments

@kaihowl
Copy link

kaihowl commented Nov 4, 2024

Description

Can the home-manager packages command also output additional "meta" attributes as for example the licenses of the installed packages? I tried recursing of the store entries and get the total transitive closure of my install with either

nix-store --query ~/.nix-profile --graph

or also

nix-store -q --requisites "/nix/store/8fdqpjianfsx9yx7gcj23nv0w51j86s8-home-manager-path"

(modulo the hash of course).

With the store entries I cannot get back the original flakes / meta attributes it seems, though. All of this is lost and not stored?

The nix cookbook has some basic license checking idea linked, but I fail to make the connection the home-manager packages.

  1. Is there a way to recover the original meta attributes from the store entries (nix question, not home-manager specific)
  2. Could the home-manager packages command be extended to make use of this information?
  3. Alternatively: How would I extend the home.nix to produce a list of packages with their licenses upon instantiation?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants