numtide / flake-utils

Pure Nix flake utility functions [maintainer=@zimbatm]
MIT License
1.15k stars 79 forks source link

default*: do not namespace? #19

Open blaggacao opened 3 years ago

blaggacao commented 3 years ago

Wouldn't it make the public api of a simple flake repo cleaner if default*, eg defaultPackage would not be re-exposed in packages?

https://github.com/numtide/flake-utils/blob/08c7ad4a0844adc4a7f9f5bb3beae482e789afa4/simpleFlake.nix#L63

So that we would do:

# ./overlay.nix
final: prev:
{
  simple-flake = {
    hello = prev.hello;
  };
  defaultPackage = prev.hello;
  devShell = {};
}
blaggacao commented 3 years ago

Ah that would break the name spacing of the genuine overlay import. But an alternative could be to filter those out when exporting packages (or alternatively when exporting overlays — so their special status gains a visual clue in the ./overlay.nix file)?