Using ./. is really big pain for development as it will take parent directory name for derivation name,
resulting into impurity and different hashes for anything that depends on it.
The alternative is builtins.path { src = ./.; name = "mypkg" } so it's a bit harder to detect if it's used wrongly.
I think it should be disallowed by Nix itself, but until then linter can do that.
I think you meant builtins.path { path = ./.; name = "mypkg" } (note the path instead of src). I encountered this while cleaning up my own expressions.
Using
./.
is really big pain for development as it will take parent directory name for derivation name, resulting into impurity and different hashes for anything that depends on it.The alternative is
builtins.path { src = ./.; name = "mypkg" }
so it's a bit harder to detect if it's used wrongly.I think it should be disallowed by Nix itself, but until then linter can do that.