diff options
| author | Akshay Nair <phenax5@gmail.com> | 2021-09-14 13:37:00 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2021-09-14 13:37:00 +0530 |
| commit | 69d464818c7a6e599771fe67d407c163c8a7a0c4 (patch) | |
| tree | b361000d0cbfa4609cc66a8a1c707e63d859990d /shell | |
| parent | 4d89e28f26075ecf3a8d132fe5177eecef99b565 (diff) | |
| download | nixos-config-69d464818c7a6e599771fe67d407c163c8a7a0c4.tar.gz nixos-config-69d464818c7a6e599771fe67d407c163c8a7a0c4.zip | |
config changes sync
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/rust.nix | 43 |
1 files changed, 43 insertions, 0 deletions
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 <nixpkgs> {}; +# 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 <nixpkgs> {}; +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); +} |
