!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

464 Members
Rust111 Servers

Load older messages


SenderMessageTime
4 Sep 2024
@justastream:matrix.orgStream

In order to satisfy the requirements, I added all the deps system wide that I did to get my shell.nix to work:

rustup 
openssl
openssl.dev
pkg-config
clang
llvmPackages.bintools 
libiconv
gcc
clang
10:02:31
@k900:0upti.meK900Yeah, the problem is that it will not set up the environment correctly10:02:44
@k900:0upti.meK900For those things to actually be findable10:02:48
@k900:0upti.meK900 Because adding things to environment.systemPackages and adding them to a dev shell's inputs doesn't actually do the same thing 10:03:03
@justastream:matrix.orgStreamI'm open to a non-system wide install but so far all I've managed to get working is shell.nix and I can't get that to work with RustRover10:03:05
@k900:0upti.meK900They are subtly different10:03:09
@k900:0upti.meK900You probably want to use direnv for IDE integration10:03:34
@k900:0upti.meK900See https://direnv.net/10:03:40
@k900:0upti.meK900And https://plugins.jetbrains.com/plugin/15285-direnv-integration for JetBrains stuff specifically10:04:21
@k900:0upti.meK900 Then you can just put use nix in your .envrc 10:04:29
@k900:0upti.meK900And the IDE should inherit those settings10:04:35
@k900:0upti.meK900Though to be honest I'm not sure how well it works with RustRover10:05:09
@k900:0upti.meK900I usually just use VSCode with rust-analyzer for Rust stuff10:05:19
@justastream:matrix.orgStreamOkay i'm going to follow your suggestion and try and get my shell.nix to work with my IDE10:12:21
@justastream:matrix.orgStream

Hey K900 , quick Q. When I try to use nix in my rust project directory I get the 'no such file or directory as default.nix'.

I have a ~/shell.nix file. Is there some way to use that?

10:54:10
@k900:0upti.meK900 Try use nix ~/shell.nix 10:55:05
@justastream:matrix.orgStream Thanks for the help! I don't have things as convenient as I want them but I've finally got my IDE to recognise Rust. I can't seem to get it to work directly from .envrc but if I run nix-shell then rust-rover my IDE seems to work 🙏 11:18:26
@justastream:matrix.orgStreamIf anyone else here is using RustRover please do let me know!11:38:07
@antifuchs:conduit.asf.computerantifuchs ⚡️ joined the room.18:08:09
@antifuchs:asf.computerantifuchs changed their display name from antifuchs to antifuchs ⚡️.18:49:35
@antifuchs:asf.computerantifuchs changed their display name from antifuchs ⚡️ to antifuchs.19:01:46
5 Sep 2024
@k900:0upti.meK900 @figsoda poke re: https://github.com/nix-community/fenix/pull/163 08:46:57
@k1gen:matrix.orgolk joined the room.10:17:12
@k1gen:matrix.orgolk o/
how can I add openssl to -deps buildInputs? is this the reason the build fails? https://paste.rs/ZXtjM.txt
here's the flake: https://paste.rs/ibDPd.txt
10:49:19
@k1gen:matrix.orgolk I needed to add perl to nativeBuildInputs... 11:35:17
@k1gen:matrix.orgolk build fails on include_bytes! being called on a .gitignored file, any way to fix this without git adding the file? 11:45:00
@qyliss:fairydust.spaceAlyssa Ross

You probably want to set OPENSSL_NO_VENDOR rather than adding perl, because perl means it's building its own OpenSSL rather than using Nixpkgs'

11:46:02
@qyliss:fairydust.spaceAlyssa Ross

(and then you need pkg-config in nativeBuildInputs, and then openssl, darwin.apple_sdk.frameworks.Security, and darwin.apple_sdk.frameworks.SystemConfiguration to buildInputs)

11:46:58
@k1gen:matrix.orgolkI just spent a day trying to make it do anything, please help me get it working first, then I'll think of reproducibility. also, I'm cross-compiling to Windows on a Linux host11:48:13
@k900:0upti.meK900Uhh11:48:23

Show newer messages


Back to Room ListRoom Version: 6