diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 088ba6b..9b143eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +# Generated by direnv and nix-shell +.direnv/* + +# vim temp file +*.swp + # Generated by Cargo # will have compiled files and executables /target/ @@ -8,3 +14,8 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + + +# Added by cargo + +/target diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6d48b6f --- /dev/null +++ b/shell.nix @@ -0,0 +1,26 @@ +{ pkgs ? import {}}: + +let + rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); + pkgs = import { overlays = [ rust_overlay ]; }; + ruststable = (pkgs.latest.rustChannels.stable.default.override { + extensions = [ + "rust-src" + ]; + }); +in +pkgs.mkShell { + buildInputs = with pkgs; [ + ruststable + sqlite + sqliteman + pkg-config + alsa-lib + ]; + + RUST_BACKTRACE = 1; + + shellHook = '' + alias gust=/home/nixolas/Documents/Gust/target/debug/gust + ''; +}