Overlays are for derivations, and this isn’t one. Putting it in an
overlay also just gives us more levels of indirection to dig through to
figure out where things are coming from.
There are various benefits to using a Nixpkgs release
- more likely that things are cached
- easier to update the input without breaking everything
This also renames a lot of things in the flake:
- `nixpkgs-unstable` to `nixpkgs-release` – partially because it’s not
unstable any more, but also because both it and the nixpkgs from
haskell.nix unstable, so it didn’t really clarify anything
- `nixpkgs` to `nixpkgs-haskellNix` – to make it clear where it comes from
- `unstable` to `release-pkgs` – the convention is to use `pkgs` for
derivation attrsets, and the source switched from unstable to release
- `nixpkgs-packages` to `tool-pkgs` – this holds our build tools, so
that seemed clearer than “nixpkgs”
This `only-tools-nixpkgs` devShell generally paralleled the
`cabal-only-tools` devShell, but avoiding haskell.nix. While I’m not a
huge fan of haskell.nix, this just created duplication and gave us a
shell with a somewhat different environment than the one used by
`nix build`, etc. It also didn’t work for everyone.
In removing that shell, it also sets the default devShell to be
`cabal-only-tools`, which some people were already using to work around
issues with the previous default.
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`.
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.
development.markdown says to use `nix build` to build the `unison` executable,
but it doesn’t work, because there is not a `default` package. This makes the
behavior match the docs.