-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
124 lines (113 loc) · 1.94 KB
/
devenv.nix
File metadata and controls
124 lines (113 loc) · 1.94 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{ pkgs, lib, config, inputs, stdenv, ... }:
{
env.LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
languages.c.enable = true;
languages.cplusplus.enable = true;
languages.rust.enable = true;
# https://devenv.sh/reference/options/#languagesrustchannel
languages.rust.channel = "stable";
packages = with pkgs; [
sccache
unzip
libllvm
libclang
llvm
alsa-lib
libpulseaudio
rust-cbindgen
libclang
gcc
libxkbcommon libdrm
# build time
autoconf
cargo
dump_syms
makeWrapper
mimalloc
nodejs
perl
pkg-config
python3
rustc
rust-cbindgen
unzip
which
# runtime
bzip2
dbus
dbus-glib
file
fontconfig
freetype
glib
gnum4
gtk3
icu
icu72
libGL
libGLU
libevent
libffi
libjpeg
libpng
libstartup_notification
libvpx
libwebp
nasm
nspr
nss_latest
pango
zip
zlib
bzip2
dbus
dbus-glib
file
fontconfig
freetype
glib
gtk3
libffi
libGL
libGLU
libevent
libjpeg
libpng
libstartup_notification
libvpx
libwebp
nasm
nspr
pango
perl
xorg.libX11
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXft
xorg.libXi
xorg.libXrender
xorg.libXt
xorg.libXtst
xorg.pixman
xorg.xorgproto
zip
zlib
];
enterShell = ''
cxxLib=$( echo -n ${pkgs.gcc}/include/c++/* )
archLib=$cxxLib/$( ${pkgs.gcc}/bin/gcc -dumpmachine )
UNSET AS
cat - > mozconfig <<EOF
ac_add_options --disable-bootstrap
#ac_add_options --without-wasm-sandboxed-libraries # this may be needed
#mk_add_options AUTOCONF={autoconf213}/bin/autoconf
ac_add_options --with-libclang-path=${pkgs.libclang.lib}/lib
#ac_add_options --with-clang-path=${pkgs.clang}/bin/clang
#export BINDGEN_CFLAGS="-cxx-isystem $cxxLib -isystem $archLib"
#export LIBCLANG_PATH="${pkgs.libclang.lib}/lib"
#export CC="${pkgs.gcc}/bin/cc"
#export CXX="${pkgs.gcc}/bin/c++"
EOF
'';
}