| 5 Jan 2023 |
@etu:failar.nu | hmmmm | 11:44:30 |
@etu:failar.nu | Now it did eval, on the same computer... not a different branch | 11:44:45 |
@etu:failar.nu | I was sure I tested this yesterday as well... however, it doesn't eval on my normal nix install | 11:45:27 |
Pol | weird | 11:45:36 |
@etu:failar.nu | Because I use nix 2.3 normally | 11:45:37 |
@etu:failar.nu | So I pulled in nix 2.12 in a shell environment and then it worked... I was sure I did this yesterday as well... | 11:46:08 |
Pol | It can be merged then :D | 11:46:25 |
@etu:failar.nu | And yeah, somehow nix 2.3 can't parse that nix code | 11:46:51 |
@etu:failar.nu | Not sure why though | 11:47:31 |
@etu:failar.nu | It would be nice to know why it doesn't work with 2.3 since it's a supported (as in, it exists in nixpkgs) version of nix though... | 11:49:04 |
Jan Tojnar | etu: it’s the interpolation in path | 11:56:20 |
Jan Tojnar | It’s 2.4 feature: https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html?highlight=Antiquotation#other-features | 11:59:45 |
Jan Tojnar | should be easy to avoid: https://nixos.org/manual/nix/stable/language/values.html?search=Antiquotation#type-path | 12:01:13 |
@etu:failar.nu | :) | 12:05:50 |
@etu:failar.nu | Yeah, makes sense, I haven't seen that syntax before so I was a bit confused | 12:06:51 |
@etu:failar.nu | Hmm, odd, I got it to work in "the first step" or something... :) | 12:18:07 |
@etu:failar.nu |  Download image.png | 12:18:11 |
@etu:failar.nu | Now I get the same error later instead of right away :D | 12:18:19 |
Pol | I don't really know then :( | 12:19:12 |
@etu:failar.nu | Interestingly enough in a repl...
./. # evals to /home/etu/code/nixpkgs ./. + "/" # evals to /home/etu/code/nixpkgs ./. ? "/aaa" # evals to /home/etu/code/nixpkgs/aaa
| 12:23:10 |
@etu:failar.nu | So the slash is dropped even when doing this:
./. + "/" + "aaa" # evals to /home/etu/code/nixpkgsaaa
| 12:23:55 |
@etu:failar.nu | Because it's a string that gets added to a path | 12:24:48 |
@etu:failar.nu | then the / is dropped, then aaa is added | 12:24:57 |
@etu:failar.nu | So I have to force the order of operation | 12:25:12 |
@etu:failar.nu | And I really thought that either...
- ./${lib.versions.majorMinor version}.nix
+ (./. + ("/" + (lib.versions.majorMinor version) + ".nix"))
or
- ./${lib.versions.majorMinor version}.nix
+ (./. + "/${lib.versions.majorMinor version}.nix")
would work... but no... it doesn't
| 12:27:36 |
@etu:failar.nu | * And I really thought that either...
- ./${lib.versions.majorMinor version}.nix
+ (./. + ("/" + (lib.versions.majorMinor version) + ".nix"))
or
- ./${lib.versions.majorMinor version}.nix
+ (./. + "/${lib.versions.majorMinor version}.nix")
would work... but no... it doesn't
| 12:27:46 |
@etu:failar.nu | The later one works in a repl :D | 12:31:35 |
@etu:failar.nu | uh... right, it doesn't work because it isn't commited | 12:35:18 |
@etu:failar.nu | In the first step it evals the files I have on disk... then it does things like creating a branch and such which doesn't include the files on disk | 12:35:47 |
@etu:failar.nu | * In the first step it evals the files I have on disk... then it does things like creating a branch and such which doesn't include the files on disk (that isn't commited) | 12:35:56 |