From 768fab19c956ee88a6c31bf51deaef95f686f90b Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Sun, 31 Jul 2022 20:23:05 +0200 Subject: [PATCH] Add initial cue template --- README.md | 7 ++++++ cue/.envrc | 1 + cue/flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ cue/flake.nix | 23 +++++++++++++++++++ flake.nix | 5 +++++ 5 files changed, 96 insertions(+) create mode 100644 cue/.envrc create mode 100644 cue/flake.lock create mode 100644 cue/flake.nix diff --git a/README.md b/README.md index 0ceb827..60bc79e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ Once your preferred template has been initialized, you can use the provided shel The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate. +### [`cue`](./cue/) + +- [Cue] 0.4.3 +- [nix-cue] + ### [`dhall`](./dhall) - [Dhall] 1.40.2 @@ -156,6 +161,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [cachix]: https://www.cachix.org [cargo]: https://doc.rust-lang.org/cargo [clippy]: https://github.com/rust-lang/rust-clippy +[cue]: https://cuelang.org [damon]: https://github.com/hashicorp/damon [dhall]: https://dhall-lang.org [dhall-to-nix]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-nix @@ -177,6 +183,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [mix]: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html [niv]: https://github.com/nmattia/niv [nix]: https://nixos.org +[nix-cue]: https://github.com/jmgilman/nix-cue [nixfmt]: https://github.com/serokell/nixfmt [nixpkgs]: https://github.com/NixOS/nixpkgs [nix-direnv]: https://github.com/nix-community/nix-direnv diff --git a/cue/.envrc b/cue/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/cue/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/cue/flake.lock b/cue/flake.lock new file mode 100644 index 0000000..8e5fc4d --- /dev/null +++ b/cue/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "dev": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1659289982, + "narHash": "sha256-XEOEHpwWSg9F3VkOBAgmuTAT3esCkseEf1v5Miyfiu8=", + "owner": "the-nix-way", + "repo": "dev-templates", + "rev": "ee031759148051457e0045238419c51d77c0852e", + "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": 1659281650, + "narHash": "sha256-iqcbzR7G498uI5DVbFXYmnit6Li80o+GTAxN9fyQhEI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a5ec6d540f73294ed83c897dedfae706def823a9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "dev": "dev" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/cue/flake.nix b/cue/flake.nix new file mode 100644 index 0000000..1a63f23 --- /dev/null +++ b/cue/flake.nix @@ -0,0 +1,23 @@ +{ + description = "A Nix-flake-based Dhall 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) cue mkShell; + in { + devShells = { + default = mkShell { + buildInputs = [ cue ]; + + shellHook = '' + ${cue}/bin/cue version + ''; + }; + }; + }); +} diff --git a/flake.nix b/flake.nix index 3acd8a3..8cb9784 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,11 @@ }; templates = { + cue = { + path = ./cue; + description = "Cue development environment"; + }; + dhall = { path = ./dhall; description = "Dhall development environment";