Skip to content

flake-info: support importing a single nixpkgs attribute via --attr#934

Merged
raboof merged 3 commits intoNixOS:mainfrom
Jaculabilis:import-nixpkgs-single-attribute
May 15, 2025
Merged

flake-info: support importing a single nixpkgs attribute via --attr#934
raboof merged 3 commits intoNixOS:mainfrom
Jaculabilis:import-nixpkgs-single-attribute

Conversation

@Jaculabilis
Copy link
Copy Markdown
Contributor

Alternative to #916, with the additions that:

  • When an attribute is provided to nixpkgs and nixpkgs-archive, --kind package is forced.
  • The attribute is provided as --attr <name> instead of a positional argument. This is to make it easier to add something like --option in the future.

raboof and others added 2 commits May 15, 2025 10:22
to make testing somewhat faster
Without this, selecting a single attribute without remembering to specify '--kind package' will load the selected attribute and also every single NixOS option.

Using --attr instead of a positional will enable adding a --option later.
@Jaculabilis Jaculabilis changed the title Import nixpkgs single attribute flake-info: support importing a single nixpkgs attribute via --attr May 15, 2025
Copy link
Copy Markdown
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

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

seems reasonable, one comment/question

@raboof raboof merged commit 1d5c33a into NixOS:main May 15, 2025
2 checks passed
@Jaculabilis Jaculabilis deleted the import-nixpkgs-single-attribute branch May 15, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants