Stream: nix

Topic: Add a flake input that doesn’t depend on external git


view this post on Zulip Shivaraj B H (Mar 01 2024 at 11:08):

If I have to add a boolean flake input, it would look like: inputs.flag.url = “github:boolean-options/true”;. This depends on github, is there a way to add this input without this dependency?

Or is at a limitation of flake inputs that nix expressions can’t be flake inputs

view this post on Zulip Srid (Mar 01 2024 at 12:32):

Inputs can't be arbitrary expressions: https://github.com/NixOS/nix/issues/5663

You can use path:./... to point local flake though. Not sure if the hash is consistent across systems (need to verify), because I remember inconsistency when using local relative flake inputs in the path.

view this post on Zulip Tim DeHerrera (Mar 01 2024 at 17:11):

Not yet, but there really isn't a good reason in my view (if you look at the last comment on that ticket I elaborate on that a bit)

view this post on Zulip Shivaraj B H (Mar 04 2024 at 07:40):

I was looking for this to use in an internal project at work because I was getting rate-limited in CI by github, failing the build. I ended up creating a subflake with true and false flake’s and I am accessing it in another flake with the ?dir=<subdir> URL syntax.


Last updated: Nov 15 2024 at 11:45 UTC