You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a go application with buildGoApplication, replace directives are always treated as relative values. Unfortunately with flakes, this means they are relative to the source's path in the nix store. E.g. /nix/store/i0mx81w7qj13i90f9xkzk0dzhk6h0hwv-source
/nix/store/i0mx81w7qj13i90f9xkzk0dzhk6h0hwv-source/home/username/projects/example': No such file or directory
Conversely, when running go mod tidy and gomod2nix to generate gomod2nix.toml, the replace directive must either be absolute, or relative to the source in my home directory. This means I maintain two replace directives, one for building, and one for updating dependencies, and swap between the two.
It would be nice if absolute paths were not concatenated with the nix store directory when building, so an absolute path could be used in both scenarios without constantly swapping directives.
I think this is the nix flakes variant of the issue that was addressed in #2.
The text was updated successfully, but these errors were encountered:
When building a go application with
buildGoApplication
, replace directives are always treated as relative values. Unfortunately with flakes, this means they are relative to the source's path in the nix store. E.g./nix/store/i0mx81w7qj13i90f9xkzk0dzhk6h0hwv-source
This works with a replace directive such as:
But fails with a replace directive such as:
Conversely, when running
go mod tidy
andgomod2nix
to generategomod2nix.toml
, the replace directive must either be absolute, or relative to the source in my home directory. This means I maintain two replace directives, one for building, and one for updating dependencies, and swap between the two.It would be nice if absolute paths were not concatenated with the nix store directory when building, so an absolute path could be used in both scenarios without constantly swapping directives.
I think this is the nix flakes variant of the issue that was addressed in #2.
The text was updated successfully, but these errors were encountered: