Nix Rust | 670 Members | |
| Rust | 152 Servers |
| Sender | Message | Time |
|---|---|---|
| 6 Feb 2022 | ||
| Well, I got stubborn again. Naersk does work with nix run. But absolutely everything involved must be in version control. I'm assuming it's the same reason why Nix flakes don't work unless staged and I will never stop hating that about them :) At least got it to work! | 19:46:05 | |
| 8 Feb 2022 | ||
| 02:08:26 | ||
| Hey, I am coming from here: https://github.com/oxalica/rust-overlay/issues/72. How do I use nightly channel? Here is my default.nix: https://gitlab.com/aka_dude/lobsters-best-bot/-/blob/nix-build/default.nix | 02:10:02 | |
| 02:10:20 | ||
In reply to @akadude:matrix.org For
| 02:30:01 | |
This works! General question: is there a place where I can find full documentation on these things? Like, if I was writing a buildscript in Shake, haddock+official tutorial would be pretty much everything I need. But in Nix's case, even https://nixos.org/manual/nixpkgs/stable/#compiling-rust-applications-with-cargo doesn't say anything about makeRustPlatform and what kind of keys it accepts. Ideally, I think, I want typed documentation :) | 11:01:35 | |
Also, the manual mentions carnix, but you didn't. Is there something wrong with it? I want to give it a try, since my current default.nix doesn't cache at all | 11:06:58 | |
In reply to @akadude:matrix.orgSadly the documentations can be pretty hit-and-miss and you often need to read the soruces. In this case I think it's very valuable to have some docs for makeRustPlatform and you can send a PR. | 17:35:29 | |
In reply to @akadude:matrix.orgI think it was one of the earlier attempts and no longer maintained: https://github.com/nix-community/carnix | 17:36:33 | |
| 9 Feb 2022 | ||
In reply to @mixedCase:matrix.orgyes ! https://github.com/tkellogg/dura <- see there the flake.nix. Also, if you would like to hack into rust in a few minutes from any Nix powered machine, just do: nix develop github:loophp/rust-shell#stable-default | 17:41:52 | |
| Find more documentation about loophp/rust-shell here: https://github.com/loophp/rust-shell | 17:43:56 | |
In reply to @drupol:matrix.orgOooh! Thanks for looping me in! So that means naersk is now fully deprecated by this nixpkgs module? | 17:44:36 | |
| You're welcome! About Naersk, I never said that :) | 17:44:58 | |
| I don't even know if it is or not. | 17:45:08 | |
| TBH, loophp/rust-shell is very handy for me and my colleagues to quickly hack with Rust and Idea Ultimate. | 17:46:12 | |
| Well, don't know about fully replacing Naersk, but I just tried it out and my project builds just fine with this instead of Naersk, so I'm going to stick with it at least for the moment :D Thanks again! | 17:54:53 | |
| naersk and rustPlatform.buildRustPackage both work fine, just bit different | 18:24:41 | |
| naersk is similar to carnix, but uses IFD instead of nix codegen iirc - both download crates using nix | 18:25:25 | |
| rustPlatform.buildRustPackage vendors everything into one big tarball | 18:25:47 | |
| if you have many rust projects sharing same dependencies, you could benefit more from naersk | 18:26:19 | |
| but then again storage is somewhat cheap | 18:26:41 | |
If it's out-of-tree code, you can do rustPlatform.buildRustPackage + cargoFile, so you don't need FOds | 18:45:04 | |
the main thing with nixpkgs is that it had restrict-eval, so you can't do something like https://github.com/jonringer/nix-template/blob/4d852a1f72b5a8c0d79b8e6b7d5809c66414c12d/nix/nix-template.nix#L8 | 18:45:52 | |
* the main thing with nixpkgs is that it has restrict-eval, so you can't do something like https://github.com/jonringer/nix-template/blob/4d852a1f72b5a8c0d79b8e6b7d5809c66414c12d/nix/nix-template.nix#L8 | 18:46:09 | |
| 23:51:14 | ||
| 10 Feb 2022 | ||
| 11:33:17 | ||
| Is there any "low barrier of entry" flake template one can utilize to get a flaked rust nix project where
| 12:20:59 | |
| I've been looking at the below, and I feel like they're out of my competency/comfort zone:
| 12:22:40 | |
| x10an14: it's not a template, but I've been hacking on this project and it's been nice, should be easy to adopt. https://github.com/kamadorueda/alejandra/blob/main/flake.nix | 14:54:14 | |
In reply to @tomberek:matrix.org Thanks! I'll take a closer look later today =) This is where I ended up meanwhile after lots of bashing forehead against the dreaded learning curve's wall: https://git.sr.ht/~x10an14/pass-steam/tree/main/item/flake.nix | 14:58:30 | |