Add nix env

This commit is contained in:
Tristan Daniël Maat 2020-12-02 20:30:51 +00:00
commit b613911f46
Signed by: tlater
GPG key ID: 49670FD774E43268
2 changed files with 18 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

17
shell.nix Normal file
View file

@ -0,0 +1,17 @@
let
mozilla = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
pkgs = import <nixpkgs> { overlays = [ mozilla ]; };
rustChannel = pkgs.latest.rustChannels.stable;
in
with pkgs;
mkShell {
buildInputs = [
rustChannel.rust
];
shellHook = ''
export RUST_SRC_PATH="${rustChannel.rust-src}/lib/rustlib/src/rust/library"
'';
}