!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

680 Members
Rust155 Servers

Load older messages


SenderMessageTime
24 Nov 2021
@codysch:matrix.orgCodyFor reference, here's the show-trace output of the failure I'm seeing with the flake: https://gist.github.com/jmesmon/248db03c9da55b77f9a386749b867c2a . I'm not too familiar with nix, so not sure exactly how to read it.16:08:01
25 Nov 2021
@codysch:matrix.orgCody

Ok, on the second one, I figured out that it's a fix that missed nix 2.4, so I switched to using an unreleased version of nix with nix-env -i nix -f https://github.com/NixOS/nix/archive/d58f149140582330bc994d215e54b2a4fc1149ff.tar.gz to get things working.

Still not sure what the deal is with the SystemConfiguration need. It seems like it might be out of linking with libsqlite3, but I haven't managed to just override libsqlite3-sys to specify the needed deps/link args (it only needs it at link time, which makes it seem like buildInputs on libsqlite3-sys isn't quite right. Really need a way to have a dependency (like libsqlite3-sys) add a buildInput to any crates doing linking.

03:37:17
@codysch:matrix.orgCody It seems like propagatedBuildInputs might help me with this, but adding libsqlite3-sys = attrs: { propagatedBuildInputs = [ SystemConfiguration]; } to defaultCrateOverrides doesn't appear to behave the same way as adding sqx-macros = attrs: { buildInputs = [ SystemConfiguration ] }. Still digging. 04:43:19
@js:ukvly.orgJulian Stecklina joined the room.15:41:26
28 Nov 2021
@brendanzab:matrix.orgbrendanzab joined the room.04:54:25
29 Nov 2021
@anderscs:matrix.orgAnders C. Sørby joined the room.16:29:38
1 Dec 2021
@slby:matrix.orgslby joined the room.08:14:53
@brendanzab:matrix.orgbrendanzab Hey, curious if folks have any preference between cargo2nix and crate2nix? Managed to get cargo2nix working. The API seems a bit nice than crate2nix, but I'm not sure how to feel about committing a cached Cargo.nix file, and the finiky process of trying to initially generate an initial Cargo.nix, when your flake depends on it being present… 23:43:33
@brendanzab:matrix.orgbrendanzabI'm still very new to nix so it could be I'm mistaken and confused with stuff though 😅23:44:56
@brendanzab:matrix.orgbrendanzab Or do folks just jump into a nix-shell or nix develop and just call cargo directly? 23:47:09
@yuka:yuka.devYuka (she/her)depends a lot on what you want to do23:50:58
@yuka:yuka.devYuka (she/her)For development I do nix-shell23:51:06
@yuka:yuka.devYuka (she/her)For deployments I use the rustPlatform from nixpkgs23:51:22
@yuka:yuka.devYuka (she/her)you shouldn't really rely on binaries you've built in nix-shell for a longer time because the libraries they link to might be garbage-collected23:52:06
@yuka:yuka.devYuka (she/her)but doing buildRustPackage for each development run takes too much time because it is non-incremental23:52:35
2 Dec 2021
@ralith:ralith.comRalithyeah, I do all my dev in a shell00:00:46
@brendanzab:matrix.orgbrendanzabahh gotcha00:02:10
@brendanzab:matrix.orgbrendanzabthanks for the insights! can be a bit bewhildering hehe00:02:43
@brendanzab:matrix.orgbrendanzabknowing what to choose 😅00:02:58
@brendanzab:matrix.orgbrendanzabThis was what I ended up with: https://gist.github.com/brendanzab/eecc9d0b0e9c4042db1b736264e8c11c00:06:22
@brendanzab:matrix.orgbrendanzabalthough I think I might remove the packaging stuff and just keep the shell stuff, based on what folks have said00:06:53
@brendanzab:matrix.orgbrendanzabnow gotta figure out how to get VS Code to work with it 😰00:07:20
@brendanzab:matrix.orgbrendanzabhow do you work with different toolchains? as a library developer I often want to test against nightly, beta, stable, pinned toolchains. Do you just use the stable toolchain in your development flake, and then test different stuff on CI? Or are there better ways to switch between00:13:30
@brendanzab:matrix.orgbrendanzabRe. developing in a shell, do you do it on a per-package basis, or do you install cargo/rust globally? I know the latter probably isn't recommended, but seems like it could be easier for the random Rust project?00:24:41
@ralith:ralith.comRalithI have a shell per project; they tend to vary02:01:30
@ralith:ralith.comRalithyou can have a common shell that you reuse though02:01:46
@brendanzab:matrix.orgbrendanzabhow do you cope if a project is not using nix?02:05:01
@brendanzab:matrix.orgbrendanzabdo you make a personal project-specific nix thing?02:05:23
@brendanzab:matrix.orgbrendanzab * do you make a personal project-specific nix thing that you hide in your local ignores?02:05:36
@brendanzab:matrix.orgbrendanzabat any rate, this is what I ended up with: https://gist.github.com/brendanzab/8b9f1abfc28fca8fbdef745995be3a7602:06:22

Show newer messages


Back to Room ListRoom Version: 6