Stream: nix

Topic: Expressions in flake inputs


view this post on Zulip Srid (Mar 20 2024 at 12:34):

Yes, this is a known limitation: https://github.com/NixOS/nix/issues/5663

What kind of expressions are planning to use @Tamil Selvan ?

view this post on Zulip Tamil Selvan (Mar 21 2024 at 23:47):

(deleted)

view this post on Zulip Tamil Selvan (Mar 21 2024 at 23:48):

Srid said:

Yes, this is a known limitation: https://github.com/NixOS/nix/issues/5663

What kind of expressions are planning to use Tamil Selvan ?

I was trying to tinker around refactoring the flake.
@Srid as you may know we were referring to a local repo in the flake inputs during our discussion
I tried to move the local repo's path to a different file and refer it from there

inputs = {
       repo.url = "path:" + builtins.readFile "<file path that contains the local repo's absolute path>";
}

view this post on Zulip Srid (Mar 21 2024 at 23:49):

Why does repo here need to be dynamically specified? Is there a use-case you are trying to solve here? If the above is Y, what is X?

view this post on Zulip Tamil Selvan (Mar 25 2024 at 05:21):

(deleted)

view this post on Zulip Tamil Selvan (Mar 25 2024 at 05:22):

Srid said:

Why does repo here need to be dynamically specified? Is there a use-case you are trying to solve here? If the above is Y, what is X?

@Srid that was because I thought of keeping the flake file fixed and let people make changes i.e. add their own local repo path in a separate file rather than making changes in flake.

view this post on Zulip Srid (Mar 25 2024 at 11:30):

Why do you want people to be making changes to a separate file rather than on flake.nix itself? Just trying to understand the motivation here -- why not just have them edit the flake.nix file?

view this post on Zulip Tamil Selvan (Mar 26 2024 at 02:32):

Srid said:

Why do you want people to be making changes to a separate file rather than on flake.nix itself? Just trying to understand the motivation here -- why not just have them edit the flake.nix file?

We can do that too. I was just trying to get to a one click dev environment setup where users don't have to edit the flake to get the setup running as majority of the folks in our team have not been introduced to nix yet.
What you are telling makes sense tho. Let people get their hands dirty in nix this way.

view this post on Zulip Srid (Mar 26 2024 at 16:51):

Let people get their hands dirty in nix this way.

For now, this is a wise approach.

But down the like, I do like to create something with improved DX (on top of flakes/flake-parts).


Last updated: Nov 13 2024 at 13:02 UTC