Hi ! I would like to build zls with the zig version of zig-overlay in my nix shell. i tried to override the nativeBuildInputs of the zls flake like this
it compiles but zls always builds with the latest version and not the one I specified.
is there any way i can do what i want to do? i’m pretty new to nix…
Good evening folks. Apologies for the continued question. I have the same issue as Wydra in that I’d like to have my version of ZIG and ZLS have the same version in a devShell.
My (very basic) understanding of what should happen is:
1: Use the overlay from the mitchellh/zig_overly flake and specify a more current version of zig
2: Create an overlay to override nixpkgs with this more recent version of zig.
3: Then override the zig compiler use to build zls with the more recent version of zig.
4: Add zls and zig to the packages in the devShell
However if I run : nix develop -c $SHELL I get the following error:
error: builder for '/nix/store/0hcc5kc8pza9m18cvfysqq6ra51hxai2-zls-0.12.0.drv' failed with exit code 1;
last 6 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/m44q9mf6fclpmnraimgnqxj9284q8fr9-source
> source root is source
> Running phase: patchPhase
> ln: failed to create symbolic link '/p': Permission denied
> /nix/store/xfhkjnpqjwlf6hlk1ysmq3aaq80f3bjj-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
For full logs, run 'nix log /nix/store/0hcc5kc8pza9m18cvfysqq6ra51hxai2-zls-0.12.0.drv'.
error: 1 dependencies of derivation '/nix/store/s7dw83qsc8hzk63qfi0brx451dz6pwp1-nix-shell-env.drv' failed to build
I thought I had a grasp of this, but alas! Any help or input would be greatly appreciated!
I finally got this flake to work: The Zig overlay between default and master can be changed to if you would want to use the current tagged release (0.13 currently) or the “nighlty”