From b707f0caea9e8dc838fb0648491db113c0a9311c Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sun, 18 Dec 2022 17:00:54 -0800 Subject: [PATCH] first commit: added basic configuration files --- .envrc | 1 + .gitignore | 11 +++++++++++ shell.nix | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix 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 + ''; +}