From 39e54984ad12a25aa0192f4757948625e20a767f Mon Sep 17 00:00:00 2001 From: embr Date: Mon, 6 Feb 2023 16:15:18 +0100 Subject: [PATCH] Adding direnv and nix support With nix, you can now pull the dotnet sdk into scope with `nix-shell`, or if you have `direnv` installed, by running `direnv allow` - it will detect the .envrc and prompt you to do so. If you're not using either of these, this won't affect you at all. ^^ --- .envrc | 4 ++++ shell.nix | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..7de3fa2 --- /dev/null +++ b/.envrc @@ -0,0 +1,4 @@ +# if nix is installed and dotenv allowed in dir, use it to pull dependencies +if has nix; then + use nix +fi diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..59e5d78 --- /dev/null +++ b/shell.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} }: +pkgs.mkShell { + name = "afrapay"; + packages = with pkgs; [ dotnet-sdk_7 ]; +}