forked from ufirstgroup/ymlr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
46 lines (39 loc) · 1.26 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "Flake to manage elixir project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
# see https://ejpcmac.net/blog/using-nix-in-elixir-projects/
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# elixir = pkgs.elixir;
# elixir = pkgs.beam.packages.elixir;
elixir = pkgs.beam.packages.erlangR26.elixir_1_15;
in {
devShell = pkgs.mkShell {
packages = [
elixir
];
buildInputs = []
++ pkgs.lib.optionals pkgs.stdenv.isLinux [
# For ExUnit Notifier on Linux.
pkgs.libnotify
# For file_system on Linux.
pkgs.inotify-tools
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin ([
# For ExUnit Notifier on macOS.
pkgs.terminal-notifier
# For file_system on macOS.
pkgs.darwin.apple_sdk.frameworks.CoreFoundation
pkgs.darwin.apple_sdk.frameworks.CoreServices
]);
shellHook = ''
echo "ELIXIR: $(elixir --short-version)"
'';
};
});
}