-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathshell.nix
36 lines (36 loc) · 1.17 KB
/
shell.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
with import <nixpkgs> {};
clangStdenv.mkDerivation {
name = "iui-nix-shell";
nativeBuildInputs = with pkgs; [
cargo
rustc
gtk3
pkgconfig
];
shellHook = ''
export LIBCLANG_PATH="${pkgs.llvmPackages_latest.libclang.lib}/lib";
export LLVM_CONFIG_PATH="${pkgs.llvm}/bin/llvm-config";
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${stdenv.cc}/nix-support/libc-crt1-cflags)\
$(< ${stdenv.cc}/nix-support/libc-cflags) \
$(< ${stdenv.cc}/nix-support/cc-cflags) \
$(< ${stdenv.cc}/nix-support/libcxx-cxxflags) \
${
lib.optionalString stdenv.cc.isClang
"-idirafter ${stdenv.cc.cc}/lib/clang/${
lib.getVersion stdenv.cc.cc
}/include"
} \
${
lib.optionalString stdenv.cc.isGNU
"-isystem ${stdenv.cc.cc}/include/c++/${
lib.getVersion stdenv.cc.cc
} -isystem ${stdenv.cc.cc}/include/c++/${
lib.getVersion stdenv.cc.cc
}/${stdenv.hostPlatform.config} -idirafter
${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/${
lib.getVersion stdenv.cc.cc
}/include"
} \
"
'';
}