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

Rely on upstream for extracting nixpkgs options #460

Merged
merged 2 commits into from
May 19, 2022
Merged

Conversation

ncfavier
Copy link
Member

@ncfavier ncfavier commented Mar 31, 2022

Instead of extracting options from nixpkgs ourselves in flake_info.nix, use the generated options.json. As a result:

Also, we can make the flake argument to flake_info.nix optional, which fixes nixpkgs-archive's option import for local paths, and use --argstr flake instead of --arg flake so that we can pass flakes without a colon (e.g. flakes from the registry or paths).

Related to #447

@ncfavier ncfavier requested review from garbas and ysndr March 31, 2022 10:32
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot temporarily deployed to pull request March 31, 2022 10:33 Inactive
@ncfavier ncfavier changed the base branch from main to null-values March 31, 2022 10:39
@ncfavier ncfavier marked this pull request as draft March 31, 2022 11:07
Base automatically changed from null-values to main April 7, 2022 21:57
@ncfavier ncfavier marked this pull request as ready for review April 7, 2022 22:06
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2022

@github-actions github-actions bot temporarily deployed to pull request April 7, 2022 22:10 Inactive
@ncfavier ncfavier mentioned this pull request Apr 8, 2022
@github-actions
Copy link
Contributor

@github-actions github-actions bot temporarily deployed to pull request April 11, 2022 16:03 Inactive
@ncfavier
Copy link
Member Author

OK, by using --override-flake we get the full convenience of Nix's supported CLI flake references. It's unfortunate that we still have to pass the flake ref as an argument for the module path; we could probably do without it as the flake ref is included in the export anyway in flake_source.url. I'll look into it later.

Copy link
Member

@ysndr ysndr left a comment

Choose a reason for hiding this comment

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

That looks like quite a drop in replacement for nixpkgs.
The benefits are good in the sense of nixpkgs the only thing we need to watch for is that the output format does not diverge from reading other flakes' options once we do expose those on the frontend.

If it imports I'm fine with this

ncfavier added 2 commits May 19, 2022 12:38
Use the `options.json` generated in nixpkgs to be more in sync with the
manual.

Also fixes usage of `nixpkgs-archive` with local paths.
@ncfavier
Copy link
Member Author

Starting an import now

@github-actions github-actions bot temporarily deployed to pull request May 19, 2022 10:43 Inactive
@ncfavier ncfavier merged commit d0ea61a into main May 19, 2022
@ncfavier ncfavier deleted the nixos-options branch May 19, 2022 10:57
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