Add Dhall env

This commit is contained in:
Luc Perkins 2022-07-29 00:29:33 +02:00
parent a6b3c2ac6b
commit b502b21c7e
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
14 changed files with 115 additions and 28 deletions

View file

@ -1,6 +1,9 @@
# Nix flake templates for easy dev environments # Nix flake templates for easy dev environments
```shell ```shell
# Dhall
nix flake init --template github:the-nix-way/dev-templates#dhall
# Elixir # Elixir
nix flake init --template github:the-nix-way/dev-templates#elixir nix flake init --template github:the-nix-way/dev-templates#elixir

1
dhall/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

42
dhall/flake.lock Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"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": 1659047146,
"narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

40
dhall/flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "A Nix-flake-based Dhall development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
dhall = pkgs.dhall;
inherit (pkgs.lib) optionals;
inherit (pkgs.stdenv) isLinux;
otherFormats = with pkgs.haskellPackages; [
dhall-bash
dhall-docs
dhall-lsp-server
dhall-nix
dhall-json
dhall-toml
dhall-yaml
] ++ optionals isLinux (with pkgs.haskellPackages; [ dhall-csv dhall-haskell ]);
inherit (pkgs) mkShell;
in {
devShells = {
default = pkgs.mkShell {
buildInputs = [ dhall ] ++ otherFormats;
shellHook = ''
echo "dhall `${dhall}/bin/dhall --version`"
'';
};
};
});
}

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -12,8 +12,9 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
nix = pkgs.nixUnstable; nix = pkgs.nixUnstable;
dhallNix = pkgs.haskellPackages.dhall-nix;
helpers = with pkgs; [ cachix lorri nixfmt nixpkgs-fmt niv statix ]; helpers = with pkgs; [ cachix dhallNix lorri niv nixfmt nixpkgs-fmt statix ];
inherit (pkgs) mkShell; inherit (pkgs) mkShell;
in { in {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -32,11 +32,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659045899, "lastModified": 1659047146,
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=", "narHash": "sha256-2qZemVRDR5oCw0Hd32LQSWC7FaEy5sUp5ih9OxqE3yU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909", "rev": "68716026a095a765c09ec29f06ba234a0298418c",
"type": "github" "type": "github"
}, },
"original": { "original": {