-
Notifications
You must be signed in to change notification settings - Fork 2
/
shell.nix
39 lines (33 loc) · 903 Bytes
/
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
37
38
39
let
here = toString ./.;
moz_overlay = import (builtins.fetchTarball
"https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
rust = (pkgs.rustChannelOf {
channel = "stable";
}).rust.override {
extensions = [ "rust-src" "rust-analysis" ];
};
rustPlatform = pkgs.makeRustPlatform {
rustc = rust;
cargo = rust;
};
in pkgs.mkShell rec {
buildInputs = with pkgs; [
xorg.libX11
wayland
libxkbcommon
# xorg.libxcb xorg.xcbutil libxkbcommon #xorg.libXrender
libGL
libGLU
];
nativeBuildInputs = with pkgs; [
# Toolchain
rust pkg-config
# IDE tooling
rust-analyzer clippy rustfmt
];
hardeningDisable = [ "fortify" ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
}