shell.nix (1028B)
1 { pkgs ? import <nixpkgs> {} }: 2 pkgs.mkShell { 3 buildInputs = [ ]; 4 nativeBuildInputs = with pkgs; [ 5 gdb 6 autoreconfHook 7 emscripten 8 go 9 pkgconfig 10 rustup 11 llvmPackages_latest.llvm 12 llvmPackages_latest.bintools 13 zlib.out 14 llvmPackages_latest.lld 15 python3 16 ]; 17 18 RUSTC_VERSION = "nightly-2021-09-19"; 19 LIBCLANG_PATH= pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ]; 20 HISTFILE=toString ./.history; 21 22 shellHook = '' 23 export PATH=$PATH:~/.cargo/bin 24 export PATH=$PATH:~/.rustup/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/ 25 ''; 26 27 BINDGEN_EXTRA_CLANG_ARGS = 28 # Includes with normal include path 29 (builtins.map (a: ''-I"${a}/include"'') [ 30 pkgs.glibc.dev 31 ]) 32 # Includes with special directory paths 33 ++ [ 34 ''-I"${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include"'' 35 ''-I"${pkgs.glib.dev}/include/glib-2.0"'' 36 ''-I${pkgs.glib.out}/lib/glib-2.0/include/'' 37 ]; 38 }