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
nix setup does not validate licenses #4496
Comments
till
added
bug
Something isn't working
triage
Issue pending triage by one of the maintainers
labels
Dec 21, 2023
we could do something like this: nix-build -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' but it'll only work if the files have already been uploaded... so... not very useful, I think. We might need to replicate the license list into goreleaser to prevent these issues 🤔 |
caarlos0
added a commit
that referenced
this issue
Dec 21, 2023
this will check if the license provided by the user is a valid one. valid list of licenses is generated from nix's source code. closes #4496
see #4497 |
Wow, you're fast. I didn't expect anything so soon. 😁 But yeah, the generator seems to make sense. That could work. |
caarlos0
added a commit
that referenced
this issue
Dec 26, 2023
this will check if the license provided by the user is a valid one. valid list of licenses is generated from nix's source code. closes #4496
🚀 Thank you! Happy holidays! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
So for private code, I think the best "bet" is to set the license to
unfree
.But that's only what I found out after the fact — I set it to "proprietary" at first.
I am not sure if there's a better one to use, as I only read through the licenses.nix in the nixpkgs repo.
Anyway, having said all this, it would be nice if the pipeline could validate this, or maybe the config should do that? Or, add a little docs page how to distribute private code in form of documentation? Do you have any thoughts on this? I looked at the code, it seems like the license value is passed into the template that's rendered and that's it.
Also, not entirely sure if that's something that can be fixed in code. So a docs thing would work, IMHO? I can try to add something here: https://github.com/goreleaser/goreleaser/blob/c4dafdf55e8f1961ef20420d5d3514c6104046f9/www/docs/customization/nix.md
How can we reproduce this?
Set license to
proprietary
and watch the nur fail to build:goreleaser version
GoReleaser Check
Search
Supporter
Code of Conduct
Additional context
No response
The text was updated successfully, but these errors were encountered: