Set up shell.nix direnv

This commit is contained in:
Elnu 2023-06-10 12:41:10 -07:00
parent d531b91569
commit e370b29f86
2 changed files with 22 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

21
shell.nix Normal file
View file

@ -0,0 +1,21 @@
# <shell.nix>
{ pkgs ? import <nixpkgs> {}}:
let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
ruststable = (pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
];
});
in
pkgs.mkShell {
buildInputs = with pkgs; [
ruststable
rust-analyzer
bacon
pkg-config
openssl
];
}