Closed teto closed 1 year ago
This change does not seem to be needed, because both defaultNix
and shellNix
are already based on result
(only the value for the default
key is changed, and default
is not a standard name for a flake output, so a flake should not define it anyway; if you have a really nonstandard flake, you could still reach the original default
value through .defaultNix.outputs.default
or .shellNix.outputs.default
).
So you already should be able to use .shellNix.packages.${system}.ci
in your code instead of the suggested .result.packages.${system}.ci
.
BTW, a more direct way to refer to the default devshell in shell.nix
would be using .shellNix.default
instead of just .shellNix
; omitting the .default
part results in Nix scanning the flake outputs and finding just a single default
derivation there, which seems to work at the moment, but might break if another derivation appears in some top-level attribute of the flake output for some reason.
BTW, a more direct way to refer to the default devshell in shell.nix would be using .shellNix.default instead of just .shellNix; omitting the .default part results in Nix scanning the flake outputs
I think that's the part that confused me. Now that I read the code with more flake experience, seems like you are spot on. Closing, thanks for the review.
in a flake I work on, I need to provide a compatibility layer for other packages than the default one, exposing result gives me the possibility. I dont mind if this gets closed, just wanted to share the possibility.
With this PR, one can use the following shell.nix to reference a specific package