-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
59 lines (53 loc) · 1.34 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
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = ''
Daily medical reports
'';
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
rec {
devShells."${system}".default = with pkgs; mkShell {
name = "medirepo";
buildInputs = [
gnumake
gcc
readline
openssl
zlib
libxml2
curl
libiconv
elixir
beamPackages.rebar3
glibcLocales
postgresql
] ++ lib.optional stdenv.isLinux [
inotify-tools
# observer gtk engine
gtk-engine-murrine
]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
# define shell startup command
shellHook = ''
# create local tmp folders
mkdir -p .nix-mix
mkdir -p .nix-hex
mix local.hex --force --if-missing
mix local.rebar --force --if-missing
# to not conflict with your host elixir
# version and supress warnings about standard
# libraries
export ERL_LIBS="$HEX_HOME/lib/erlang/lib"
'';
};
};
}