April 21, 2021
Proposed by @Domen Kožar Reviewed and supported by Infinisil, Mic92, zimbatm, Ma27
933 out of [1558](https://github.com/search?q=filename%3A%2Fflake.lock+path%3A%2F+filename%3Aflake.lock&type=Code&ref=advsearch&l=&l=](https://github.com/search?q=filename%3A%2Fflake.lock+path%3A%2F+filename%3Aflake.lock&type=Code&ref=advsearch&l=&l=)) repositories using flakes on GitHub uses flake-utils. Since all flake-utils is doing is providing helpers with dealing with system in the outputs, it's a design smell.
system is an input if you observe it from a packaging point of view (rather than an output). It's a required parameter for derivation for example.
Writing flakes is cumbersome due to the cognitive overhead of looking up how outputs have to be structured around the system attribute and all the functions dealing with it.
All of the above makes it harder to start using flakes and harder to maintain a flake.
system as an outputAn example flake:
{
description = "A very basic flake";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
defaultPackage = nixpkgs.callPackage ./mypkg.nix {};
);
}
system as an inputAn example flake: