-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
fetchBower: fold arg in all-packages into the nix file #21906
Conversation
Hi @rht, thanks for the PR. I don't know if this change is for the better or not. I also don't know whether an auto-generated |
I see. I have checked that both are used extensively.
With |
Thank you for your contribution. For the time being, I don't know of any plans to make |
Wait, what? I am still around to discuss. I haven't even run this through all-packages.nix yet. It's a choice between standardization (enforce one scoping method to avoid future confusion) and allowing all the options in (submodule, inherit, ...). |
@rht I agree that having a single style would be great. However:
Or is there some huge benefit this change brings that I overlooked? |
This is solved with breaking the one monolithic PR into manageable pieces.
This 'field' has been solved through linters, e.g. gofmt, or several standards in js (due to the scale and scope of the .nix language, I think there will be just one for a long time). I have been able to figure out the "preferred" style through reading how the core packages are written, or packages that have been heavily patched, or via statistics like in #21906 (comment). |
@rht ok. I actually prefer the old way, as it makes it more obvious what packages a certain package depends on. Your statistics seems to show that both are used about the same amount. I don't have any hard opinions on this and I also don't feel like I am in the position to decide this one. Reopening for further comments. |
Another reason to prefer the variant with explictly passing the argument in
to
Although the second variant is probably better if you need a "transitive" override, where all the other packages taken from |
The usage for the first variant is harder to capture, The latter,
Did you mean here is no way to ensure this with the first variant? It is counterintuitive, given that bower2nix is specified at e: s/grep/ag/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For python applications we always pass pythonPackages
and it seems to be well accepted. It would make sense to do the same with nodePackages
I prefer to be specific about dependencies, so think it's fine as it is. |
It seems that consistency is reinforced only within each language ecosystem. Though globally,
the former has caught up in usage. |
Are there any updates on this pull request, please? |
This is just a stylistic change, and doesn't seem to have consensus for change, so leaving it as is seems like the best solution for now. If we want to refactor this on a greater scale, this might be suitable for https://github.com/NixOS/rfcs. If anyone feels deeply about this, feel free to reopen. |
Motivation for this change
Would this be better?
If such, I'm thinking of doing the same to the rest of the packages, so that
all-packages.nix
(or a major subset of it) can be automatically-generated through a fs walk.The PR is made minimal in order to avoid merge conflicts w/ other existing PRs and occasional rebase (which has staled some feats e.g. attempt at deterministic build #2281).
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)