numtide / flake-utils

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

simpleFlake: `self` in overlays / packages #20

Closed blaggacao closed 3 years ago

blaggacao commented 3 years ago

Using simpleFlake, assuming nix build .#release is meant to build a release from source code:

It would be nice to provide access to the flake's self somehow to do src = self when needed. A global reference to repo root seems somehow a little more flakeonic, than doing src = ../../. (or whatever relpath).

Not sure if possible, though, without altering the signature of the overlay.nix file.

Would also alleviate enforcement of proposal in #15, I guess.

Is it really a problem to break compat with nix-*? For those who need it it could be overlay.nix + overlay.fl.nix (a thin wrapper that does what it can).

blaggacao commented 3 years ago

I no longer believe this proposal belongs to the flake-utils layer of the :onion: .