From 6388495fc7b72dafd7fbaba783155721b36b2f80 Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Wed, 25 Mar 2020 17:22:32 +0100 Subject: [PATCH] Add support for nix-shell and direnv --- .envrc | 1 + common-attrs.nix | 7 +++++++ shell.nix | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 .envrc create mode 100644 common-attrs.nix 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/common-attrs.nix b/common-attrs.nix new file mode 100644 index 0000000..baf6681 --- /dev/null +++ b/common-attrs.nix @@ -0,0 +1,7 @@ +pkgs: +{ + buildInputs = with pkgs; [ + restic + ruby + ]; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..7f90db2 --- /dev/null +++ b/shell.nix @@ -0,0 +1,7 @@ +{ pkgs ? import {} }: +let + commonAttrs = import ./common-attrs.nix pkgs; +in +pkgs.mkShell { + inherit (commonAttrs) buildInputs; +}