Skip to content

Commit 3ee1459

Browse files
committed
functions enumeration
1 parent a0717ab commit 3ee1459

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

shell.nix

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,27 @@
1717
in
1818
pkgs.mkShell rec {
1919
buildInputs = with pkgs; [
20+
rustc
21+
cargo
22+
gcc
23+
rustfmt
24+
clippy
2025
clang
2126
# Replace llvmPackages with llvmPackages_X, where X is the latest LLVM version
2227
llvmPackages_21.bintools
23-
rustup
2428
openssl
2529
pkg-config
2630
gcc
2731
];
32+
33+
# Certain Rust tools won't work without this
34+
# This can also be fixed by using oxalica/rust-overlay and specifying the rust-src extension
35+
# See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/3?u=samuela. for more details.
36+
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
37+
2838
RUSTC_VERSION = overrides.toolchain.channel;
2939
# https://github.com/rust-lang/rust-bindgen#environment-variables
3040
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
31-
shellHook = ''
32-
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
33-
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
34-
'';
3541
# Add precompiled library to rustc search path
3642
RUSTFLAGS = (builtins.map (a: ''-L ${a}/lib'') [
3743
# add libraries here (e.g. pkgs.libvmi)
@@ -50,4 +56,4 @@ in
5056
''-I"${pkgs.glib.dev}/include/glib-2.0"''
5157
''-I${pkgs.glib.out}/lib/glib-2.0/include/''
5258
];
53-
}
59+
}

0 commit comments

Comments
 (0)