-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
108 lines (102 loc) · 2.44 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Flake for building nerves system
# Use `nix develop .` for regular Nerves builds
# Use `nix develop .#fhs` for Nerves System builds
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
erlangVersion = "erlang_27";
elixirVersion = "elixir_1_17";
erlang = pkgs.beam.interpreters.${erlangVersion};
elixir = pkgs.beam.packages.${erlangVersion}.${elixirVersion};
commonPkgs = [
elixir
erlang
pkgs.pkg-config
];
supportPkgs = with pkgs; [
atk
brotli
bzip2
cairo
coreutils
dbus
expat
fontconfig
freetype
fribidi
gcc
gdk-pixbuf
glfw-wayland
glib
glib
graphite2
gtk3
harfbuzz
lerc
libGL
libdatrie
libdeflate
libepoxy
libffi
libjpeg
libmnl
libpng
libselinux
libsepol
libthai
libtiff
libtool
libwebp
libxkbcommon
pango
pcre2
pixman
util-linux
wayland
xorg.libX11
xorg.libXau
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXdmcp
xorg.libXext
xorg.libXfixes
xorg.libXft
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxcb
xorg.xorgproto
zlib
zstd
];
# Scenic User Environment
scenic = pkgs.buildFHSUserEnv {
name = "fhs-shell";
linkLibs = true;
extraOutputsToInstall = [ "dev" ];
targetPkgs = pkgs: commonPkgs ++ supportPkgs;
runScript = pkgs.writeScript "init.sh" ''
unset MIX_TARGET
export FHS=true
export SCENIC_LOCAL_TARGET=cairo-gtk
export PKG_CONFIG_PATH=${pkgs.xorg.xorgproto}/share/pkgconfig:/usr/lib/pkgconfig
exec zsh
'';
};
in
{
devShells.scenic = scenic.env;
}
);
}