Add default.nix & direnv.

This commit is contained in:
Bill Thiede 2021-02-21 08:30:03 -08:00
parent db29d662c6
commit d4c94a5a3a
2 changed files with 28 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use_nix

27
default.nix Normal file
View File

@ -0,0 +1,27 @@
let
pkgs = import <nixpkgs> {
overlays = [
(import (builtins.fetchTarball
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
};
rust = pkgs.rust-bin.stable.latest.rust.override {
extensions = [ "rust-src" ];
};
in with pkgs;
pkgs.mkShell rec {
name = "rust";
buildInputs = [
openssl
pkg-config
cargo
rust
rustfmt
rust-analyzer
wasm-pack
wasm-bindgen-cli
nodePackages.rollup
];
}