-
Notifications
You must be signed in to change notification settings - Fork 2.7k
basic nix support, builds subkey and provides it to other packages #13713
Conversation
Nix usage in the past had the problem that is was got out-dated since there was no CI to check that it still builds. |
@ggwpez as soon as repo will get rust-toolchain =
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; # by the way, i bet parity breaks people and CI often because toolchain and its components are not in repo to upgrade cpp deps (clang/protoc/openssl):
any likely you used nix before flake, and may be 3 years ago right? that is different these days. and really people use and likely subkey will not change its name. and hope will not start doing things like running wasm lightclient with network access:) also as in PR - gitignore reused. |
I use this in some random project CI. CI will break here. i doubt modifying parity CI is possible goal now (that needs alignment from parity to them create cachix, etc) but here it is
also flakes allow to fully evaluate but not build to avoid nix rot, but that is for huge repos. so nix breaks much less these days. |
Follow up likely would be replace in chains which nix substrate/polkadot/cumulus stuff to reuse env/lib/rust setup (hence adding something like |
@ggwpez i am not agains CI PR sure, but that could be out of scope for Parity to merge it now? so nixified subkey tool is nice regardless imho. you can onliner it it on nixos ;) |
oh, there was some #13706 . imho nix should be in root to cover tools too ;) |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
I will fix it once per comments. Hope Parity will be able to review this time to 2 core devs (I start feeling bearish :( btw, not only this PR but some awesome otherrs ) . Cosmos and Ethereum already awesomly nixified. So unlike them, Substrate is of too high ABI/API fidelity, so cannot make it in outer repo without being all the time broken. |
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.
Thanks for the PR and really sorry for this not getting merged sooner. I started making some suggestions but they became too much to add here, so here's a commit with all my proposed changes: b8c4f7c. Some are just style nits, but some other changes make the definition simpler (like using bindgenHook
instead of manually setting up clang), feel free to include whatever you think makes sense.
cargo = pkgs.rust-bin.beta.latest.default; | ||
rustc = pkgs.rust-bin.beta.latest.default; |
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.
stable works as well, and we could even use the rust toolchain from nixpkgs directly (that's what I use to build subkey on my computer).
@dzmitry-lahoda could you fix the conflicts so that this can be merged? I can't push to your branch. |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
Basic nix support.
Builds subkey via nix
nix run .#subkey
, ensure flakes enabled (zero to nix installer is default)Is there something left for follow-up PRs?
no follow up, so may build other tools if there are later
other usage of nix can be seen here https://github.com/paritytech/zombienet for example