Skip to content

Commit 5de086f

Browse files
committed
add nix flake
1 parent 49508e6 commit 5de086f

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

flake.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
description = "A Nix-flake-based Elm development environment";
3+
4+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
9+
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
10+
pkgs = import nixpkgs { inherit system; };
11+
});
12+
in
13+
{
14+
devShells = forEachSupportedSystem ({ pkgs }: {
15+
default = pkgs.mkShell {
16+
packages = (with pkgs.elmPackages; [ elm ]) ++ (with pkgs; [ elm2nix ]);
17+
};
18+
});
19+
};
20+
}

0 commit comments

Comments
 (0)