nix flake show support + remove flake-utils
Motivation
I ran the nix shell command given in the README on darwin aarch64 like so:
nix shell 'gitlab:haskell-wasm/ghc-wasm-meta?host=gitlab.haskell.org'
> error: attribute 'aarch64-darwin-gmp' missing
Ah, but I see from the flake.nix that aarch64 darwin should be supported, so I execute
nix flake show 'gitlab:haskell-wasm/ghc-wasm-meta?host=gitlab.haskell.org'
> error: expected a derivation
Huh.
This is unexpected, but I found: https://github.com/nix-community/nur-packages-template/pull/75/files, which gives the solution, so I implemented it here, but I couldn't figure out flake-utils, so I implemented my usual solution and I removed flake-utils. If this is too heavy handed, please let me know :)
Solution
nix flake show
appears to need legacyPackages and packages, so I added those in my implementation.
The following command will now successfully display the available packages:
nix flake show
Drawbacks
One terse line of code is required to replace flake-utils.
Out of Scope
nix shell 'gitlab:haskell-wasm/ghc-wasm-meta?host=gitlab.haskell.org'
This line doesn't execute on aarch64 darwin still (no change), but nix shell 'gitlab:haskell-wasm/ghc-wasm-meta?host=gitlab.haskell.org#all_9_12'
seems to work. nix build .#all_9_12
works locally as well.