From e583073582d55d9760708365380efeaaf50f9ab0 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 1 Aug 2022 03:04:16 +0200 Subject: [PATCH] Add Nickel env --- README.md | 6 +++++ flake.nix | 5 ++++ nickel/.envrc | 1 + nickel/flake.lock | 60 +++++++++++++++++++++++++++++++++++++++++++++++ nickel/flake.nix | 23 ++++++++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 nickel/.envrc create mode 100644 nickel/flake.lock create mode 100644 nickel/flake.nix diff --git a/README.md b/README.md index e7a61d1..21901c7 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Once your preferred template has been initialized, you can use the provided shel | [Hashicorp] tools | [`hashi`](./hashi/) | | [Java] | [`java`](./java/) | | [Kotlin] | [`kotlin`](./kotlin/) | +| [Nickel] | [`nickel`](./nickel/) | | [Nim] | [`nim`](./nim/) | | [Nix] | [`nix`](./nix/) | | [Node.js][node] | [`node`](./node/) | @@ -127,6 +128,10 @@ The sections below list what each template includes. In all cases, you're free t - [Kotlin] 1.7.10-release-333 - [Gradle] 7.5 +### [`nickel`](./nickel/) + +- [Nickel] 0.1.0 + ### [`nim`](./nim) - [Nim] 1.6.6 @@ -228,6 +233,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [mach-nix]: https://github.com/DavHau/mach-nix [maven]: https://maven.apache.org [mix]: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html +[nickel]: https://nickel-lang.org [nim]: https://nim-lang.org [nimble]: https://github.com/nim-lang/nimble [niv]: https://github.com/nmattia/niv diff --git a/flake.nix b/flake.nix index 07bae67..cdb49ce 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,11 @@ description = "Kotlin development environment"; }; + nickel = { + path = ./nickel; + description = "Nickel development environment"; + }; + nim = { path = ./nim; description = "Nim development environment"; diff --git a/nickel/.envrc b/nickel/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/nickel/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/nickel/flake.lock b/nickel/flake.lock new file mode 100644 index 0000000..e4a5502 --- /dev/null +++ b/nickel/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "dev": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1659301425, + "narHash": "sha256-ws9jVuS3XKx5nYITvSGnMDj8y+JLu7W4ZLWgSoaWDG0=", + "owner": "the-nix-way", + "repo": "dev-templates", + "rev": "34bf508a971639577be4ac3fc422897d380c5086", + "type": "github" + }, + "original": { + "owner": "the-nix-way", + "repo": "dev-templates", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1659300577, + "narHash": "sha256-mTlKMvvBJ4W32Y9VdEXATyMDUWEYVO4P9IWo8Mzn3rM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b91029be03d836b5ab33042aaf0167f02221c1ac", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "dev": "dev" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nickel/flake.nix b/nickel/flake.nix new file mode 100644 index 0000000..e1d405a --- /dev/null +++ b/nickel/flake.nix @@ -0,0 +1,23 @@ +{ + description = "A Nix-flake-based Protobuf development environment"; + + inputs = { dev.url = "github:the-nix-way/dev-templates"; }; + + outputs = { self, dev }: + let inherit (dev.lib) flake-utils nixpkgs; + in flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + inherit (pkgs) mkShell nickel; + in { + devShells = { + default = mkShell { + buildInputs = [ nickel ]; + + shellHook = '' + ${nickel}/bin/nickel --version + ''; + }; + }; + }); +}