-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
64 lines (57 loc) · 1.72 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
60
61
62
63
64
{
description = ''
Plataforma PEA Pescarte
'';
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
};
outputs = inputs@{ self, nixpkgs, unstable, utils }:
utils.lib.mkFlake rec {
inherit self inputs;
supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
outputsBuilder = channels: {
packages = { inherit (channels.nixpkgs) package-from-overlays; };
devShell = channels.unstable.mkShell {
name = "fuschia";
buildInputs = with channels.unstable; [
gnumake
gcc
readline
openssl
zlib
libxml2
curl
libiconv
# my elixir derivation
# exDev
elixir
beamPackages.rebar3
glibcLocales
postgresql
] ++ pkgs.lib.optional stdenv.isLinux [
inotify-tools
# observer gtk engine
gtk-engine-murrine
]
++ pkgs.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"
'';
};
};
};
}