Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow ./. #32

Open
domenkozar opened this issue Apr 10, 2020 · 1 comment
Open

Don't allow ./. #32

domenkozar opened this issue Apr 10, 2020 · 1 comment

Comments

@domenkozar
Copy link

domenkozar commented Apr 10, 2020

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.

@domenkozar domenkozar changed the title Prevent ./. Don't allow ./. Apr 10, 2020
@jappeace
Copy link

jappeace commented Aug 1, 2020

I think you meant builtins.path { path = ./.; name = "mypkg" } (note the path instead of src). I encountered this while cleaning up my own expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants