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

Repair the Nix flake #4923

Merged
merged 3 commits into from
May 29, 2024
Merged

Repair the Nix flake #4923

merged 3 commits into from
May 29, 2024

Conversation

sellout
Copy link
Contributor

@sellout sellout commented May 8, 2024

Overview

This does the minimum to get nix flake check working.

The primary issue is that the standard flake outputs require flat package sets, and this flake produced nested ones.

Fixes #4940.

Implementation notes

This merges package sets into a single one rather than making them separate entries in the outputs.

The only other change was to correct the attribute name used for the UCM docker image’s command.

Interesting/controversial decisions

This currently flattens the package sets and adds prefixes to them, for some conceptual groupings. The prefixes could be removed, though.

Also, if we wanted to maintain some of the nesting, we could use the legacyPackages output, but that is (as it says) legacy, and either way it’s breaking the names, so we might as well just adopt the current flat style.

@sellout
Copy link
Contributor Author

sellout commented May 24, 2024

I can also remove the garnix config before merging. I mostly have it to make sure I’m getting decent coverage on the Nix bits. But it looks like there’s already some of that in GitHub workflows.

@sellout sellout marked this pull request as ready for review May 24, 2024 21:15
@sellout sellout requested review from ceedubs and aryairani May 24, 2024 21:15
@aryairani
Copy link
Contributor

I can also remove the garnix config before merging. I mostly have it to make sure I’m getting decent coverage on the Nix bits. But it looks like there’s already some of that in GitHub workflows.

Just spotted this. Yeah I feel a bit blocked on the garnix piece because I don't understand it and haven't set up a time to go over it.

I'd say let's remove that if it's not integral, and then we can figure out how to improve CI separately, which could include garnix, or sticking with what we have, or replacing some of what we have with something else.

This does the minimum to get `nix flake check` working.;

The primary issue is that flakes require flat package sets, and this flake
produced nested ones. This flattens the package sets without renaming anything.
E.g., `packages.${system}.docker.ucm` is now `packages.${system}.ucm`, and
similar for other derivations.

The only other change was to correct the attribute name for the UCM docker
image’s command.
This adds some grouping to the outputs, since they can’t be grouped in attribute
sets.

It also updates the relevant docs with the new names.

Here are the renamings:
- `packages.haskell-nix.some:cabal:thing`→ `packages.component-some:cabal:thing`
- `packages.docker.ucm` → `packages.docker-ucm`
- `apps.haskell-nix.some:cabal:thing` → `apps.component-some:cabal:thing`, and
- `devShells.haskell-nix.unison-cli` → `devShells.cabal-unison-cli`.
@sellout
Copy link
Contributor Author

sellout commented May 28, 2024

Just spotted this. Yeah I feel a bit blocked on the garnix piece because I don't understand it and haven't set up a time to go over it.

I'd say let's remove that if it's not integral, and then we can figure out how to improve CI separately, which could include garnix, or sticking with what we have, or replacing some of what we have with something else.

Done.

@sellout sellout added ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved labels May 28, 2024
@aryairani aryairani merged commit ec6603a into unisonweb:trunk May 29, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nix flake is invalid
2 participants