From 69d464818c7a6e599771fe67d407c163c8a7a0c4 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 14 Sep 2021 13:37:00 +0530 Subject: config changes sync --- shell/rust.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 shell/rust.nix (limited to 'shell') diff --git a/shell/rust.nix b/shell/rust.nix new file mode 100644 index 0000000..e36c70a --- /dev/null +++ b/shell/rust.nix @@ -0,0 +1,43 @@ +# with import {}; +# let src = fetchFromGitHub { +# owner = "mozilla"; +# repo = "nixpkgs-mozilla"; +# rev = "9f35c4b09fd44a77227e79ff0c1b4b6a69dff533"; +# sha256 = "18h0nvh55b5an4gmlgfbvwbyqj91bklf1zymis6lbdh75571qaz0"; +# }; +# in +# with import "${src.out}/rust-overlay.nix" pkgs pkgs; +# stdenv.mkDerivation { +# name = "rust-env"; +# buildInputs = [ +# # Note: to use use stable, just replace `nightly` with `stable` +# latest.rustChannels.nightly.rust +# +# # Add some extra dependencies from `pkgs` +# pkgconfig openssl +# ]; +# +# # Set Environment Variables +# RUST_BACKTRACE = 1; +# } + +with import {}; +mkShell rec { + buildInputs = [ + # Build tools + rustup + pkg-config + + # Deps + libclang + + # Dev + nodePackages.nodemon + rust-analyzer + ]; + nativeBuildInputs = [ clang ]; + + LIBCLANG_PATH = "${libclang.lib}/lib"; + RUST_SRC_PATH = rust.packages.stable.rustPlatform.rustLibSrc; + LD_LIBRARY_PATH = lib.makeLibraryPath (buildInputs ++ nativeBuildInputs); +} -- cgit v1.3.1