| 6 Sep 2022 |
| dusk changed their profile picture. | 23:50:07 |
| 7 Sep 2022 |
dpc | Can I somehow do nix shell nixpkgs#rust-analyzer nixpkgs#openssl nixpkgs#pkg-config github:nix-community/fenix#complete without running nix flake init first?
Basically when I have to temporarily work on Rust project that isn't flakified, I just want to get the dev env working without having some extra files checked in.
| 18:25:00 |
slby | Yes | 18:25:59 |
slby | With this syntax you don't need a flake. | 18:26:25 |
dpc | Oh, I see. I got myself confused then by using .# initially . Thanks. | 18:30:19 |
slby | And you probably want someting like
nix shell github:nix-community/fenix#complete.toolchain
for enix.
| 18:31:21 |
slby | * And you probably want someting like
nix shell github:nix-community/fenix#complete.toolchain
for fenix.
| 18:31:24 |
dpc | One last thing nix shell nixpkgs#rust-analyzer nixpkgs#openssl.dev nixpkgs#openssl nixpkgs#pkg-config github:nix-community/fenix#complete.toolchain does not add openssl to PKG_CONFIG_PATH | 18:33:26 |
dpc | What can I do about it, other than add it manually? | 18:33:55 |
pennae | use a devShell with all your dependencies in it rather than nix shell | 18:36:46 |
slby | I am not too sure about that, does it work with nix develop? It doesn't know what kind of input openssl is. so it doesn't prepare it. | 18:37:02 |
| 8 Sep 2022 |
figsoda | I think you would need to set LD_LIBRARY_PATH to make it work with nix develop | 00:54:00 |
figsoda | nix-shell should work though | 00:54:22 |
dpc | https://github.com/fedimint/fedimint/blob/master/docs/nix-ci.md in case it's of any use it interest to anyone | 15:52:00 |
dpc | * https://github.com/fedimint/fedimint/blob/master/docs/nix-ci.md in case it's of any use it interest to anyone Understanding Fedimint's Nix-based building system and CI | 15:52:33 |
dpc | * https://github.com/fedimint/fedimint/blob/master/docs/nix-ci.md Understanding Fedimint's Nix-based building system and CI in case it's of any use it interest to anyone | 16:08:47 |
| 12 Sep 2022 |
| Xe Iaso changed their profile picture. | 21:40:20 |
| 13 Sep 2022 |
| farcaller joined the room. | 17:44:41 |
farcaller | anyone's using vscode and rust-analyzer? I've tried about a dozen configurations now and each one breaks in a new and exciting way :) what I want to have is nix shell that's capable of building a rust project and packaging it into docker with the openssl (rustls is known broken for my use case) and a working rust-analyzer so I could write the code with some LSP support. My very latest iteration was trying to use ipetkov/crane but rust-analyzer fails on that with
[ERROR rust_analyzer::lsp_utils] rust-analyzer failed to load workspace: Failed to find sysroot for Cargo.toml file /home/nixos/src/kube-cidr-manager/Cargo.toml. Is rust-src installed?: can't load standard library from sysroot
/nix/store/n7m9l6djxf3xcdc2dk9scc6rbpw825p9-rustc-1.63.0
(discovered via `rustc --print sysroot`)
try installing the Rust source the same way you installed rustc
| 17:49:14 |
farcaller | oh Xe Iaso, fancy seeing you around here. | 17:49:36 |
Xe Iaso | Hi, i exist | 17:49:52 |
Xe Iaso | I'm in a meeting right now so I'm at like 1/4th brain | 17:50:03 |
farcaller | also: I think rust-analyzer works because I got .envrc with use flake and a direnv plugin for vscode but that's some arcane magic at that point. | 17:50:22 |
farcaller |  Download image.png | 17:57:46 |
farcaller | openssl works. kinda. | 17:57:51 |
farcaller | If I add RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}" to my mkShell attrs then rust-analyzer seems to work too. To some extent:
proc macro `main` not expanded: Cannot create expander for /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so: Io(Custom { kind: InvalidData, error: DlOpen { desc: "/nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34\' not found (required by /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so)" } })rust-analyzerunresolved-proc-macro
| 18:11:15 |
farcaller | * If I add RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}" to my mkShell attrs then rust-analyzer seems to work too. To some extent:
proc macro mainnot expanded: Cannot create expander for /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so: Io(Custom { kind: InvalidData, error: DlOpen { desc: "/nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/libc.so.6: versionGLIBC_2.34' not found (required by /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so)" } })rust-analyzerunresolved-proc-macro`
| 18:11:26 |
farcaller | * If I add RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}" to my mkShell attrs then rust-analyzer seems to work too. To some extent:
proc macro mainnot expanded: Cannot create expander for /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so: Io(Custom { kind: InvalidData, error: DlOpen { desc: "/nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/libc.so.6: versionGLIBC\_2.34' not found (required by /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio\_macros-a639847ca16674fe.so)" } })rust-analyzerunresolved-proc-macro\
| 18:11:34 |
farcaller | * If I add RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}" to my mkShell attrs then rust-analyzer seems to work too. To some extent:
proc macro mainnot expanded: Cannot create expander for /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio_macros-a639847ca16674fe.so: Io(Custom { kind: InvalidData, error: DlOpen { desc: "/nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/libc.so.6: versionGLIBC\_2.34' not found (required by /home/nixos/src/kube-cidr-manager/target/debug/deps/libtokio\_macros-a639847ca16674fe.so)" } })rust-analyzerunresolved-proc-macro
| 18:11:37 |
farcaller | I have no idea why it looks up glibc 2.34 in what clearly is glibc 2.33 | 18:12:11 |