Add elm env

This commit is contained in:
Luc Perkins 2022-07-31 21:10:16 +02:00
parent 79fd1fa0b6
commit 5a77cf829a
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
5 changed files with 98 additions and 0 deletions

View file

@ -73,6 +73,11 @@ The sections below list what each template includes. In all cases, you're free t
- [Elixir] 1.13.4, including [mix] and [IEx] - [Elixir] 1.13.4, including [mix] and [IEx]
- [Node.js][node] 18.7.0 (largely for [Phoenix] projects) - [Node.js][node] 18.7.0 (largely for [Phoenix] projects)
### [`elm`](./elm/)
- [Elm] 0.19.1
- [elm2nix] 0.2.1
### [`gleam`](./gleam/) ### [`gleam`](./gleam/)
- [Gleam] 0.22.1 - [Gleam] 0.22.1
@ -171,6 +176,8 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[dhall]: https://dhall-lang.org [dhall]: https://dhall-lang.org
[dhall-to-nix]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-nix [dhall-to-nix]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-nix
[elixir]: https://elixir-lang.org [elixir]: https://elixir-lang.org
[elm]: https://elm-lang.org
[elm2nix]: https://github.com/cachix/elm2nix
[flake-utils]: https://github.com/numtide/flake-utils [flake-utils]: https://github.com/numtide/flake-utils
[gleam]: https://gleam.run [gleam]: https://gleam.run
[go]: https://go.dev [go]: https://go.dev

1
elm/.envrc Normal file
View file

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

60
elm/flake.lock Normal file
View file

@ -0,0 +1,60 @@
{
"nodes": {
"dev": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659291915,
"narHash": "sha256-W1on31THSVnqFf/eC8wxP+oGu1jRpFb7K419w21ijNc=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "41e9f202186994255e28bfa4c518e0c9ffce2bb5",
"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": 1659291823,
"narHash": "sha256-8GrIQYelrtzEAXDWdfHpAodwrjL08mVES7nRDXSF9fE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4a778d9b98941fe28f0ac4b8400749a16dbb03fe",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"dev": "dev"
}
}
},
"root": "root",
"version": 7
}

25
elm/flake.nix Normal file
View file

@ -0,0 +1,25 @@
{
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;
elm = pkgs.elmPackages.elm;
in {
devShells = {
default = mkShell {
buildInputs = [ elm ] ++ (with pkgs; [ elm2nix ]);
shellHook = ''
echo "elm `${elm}/bin/elm --version`"
'';
};
};
});
}

View file

@ -59,6 +59,11 @@
description = "Elixir development environment"; description = "Elixir development environment";
}; };
elm = {
path = ./elm;
description = "Elm development environment";
};
gleam = { gleam = {
path = ./gleam; path = ./gleam;
description = "Gleam development environment"; description = "Gleam development environment";