As far as I understand, basically the arcan
input in your example will contain the result of evaluating the outputs
function of the arcan
flake (and it works this way for every flake), with the additional property that if you try to use it as a string, a flake will evaluate to a path containing the contents of the repository that contains the flake.
The reason that you have to specifically use arcan.defaultPackage.x86_64-linux
, rather than just arcan
, is actually quite useful, because for some flakes you do not want to use the defaultPackage
it provides for some system, but you may want to use some of its other outputs. Take for example flake-utils, which doesn’t even provide a derivation to build, only a set of functions.
Also, flakes are supposed to be reproducible (or close to it) so that’s why you have to pass a specific system to build for.
The defaultPackage.${system}
output is used by nix build
when you don’t pass a specific attribute of outputs.packages
to build.
So all in all, the way you’re using the flake seems perfectly fine to me