From 99491b3b0d0f9b3af8293773ecd0e07ca3cd696e Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Sat, 11 Nov 2023 03:22:57 +0100 Subject: [PATCH] Add nix shell Co-authored-by: Simon Bruder --- .envrc | 2 ++ .gitignore | 4 ++++ flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 17 +++++++++++++++ shell.nix | 10 +++++++++ 5 files changed, 94 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..a328d7e --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +source_env_if_exists .envrc.private +use flake diff --git a/.gitignore b/.gitignore index 3052a68..b8fbb80 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,7 @@ Desktop.ini # Misc hs_err_*.log ~$* + +# Direnv +.direnv +.envrc.private diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..521dc63 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1699291058, + "narHash": "sha256-5ggduoaAMPHUy4riL+OrlAZE14Kh7JWX4oLEs22ZqfU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e42786b --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + description = "Catering"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShells.default = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..098e143 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +{ pkgs ? import { } }: +with pkgs; +mkShell { + buildInputs = [ + asciidoctor + jdk17 + plantuml + watchexec # enables automatic compiling on change + ]; +}