This repository was archived by the owner on Jun 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.nix
More file actions
38 lines (32 loc) · 1.31 KB
/
shell.nix
File metadata and controls
38 lines (32 loc) · 1.31 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
let
# Pinned nixpkgs, deterministic. Last updated: 2/12/21.
# pkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/a58a0b5098f0c2a389ee70eb69422a052982d990.tar.gz")) {};
# Rolling updates, not deterministic.
pkgs = import (fetchTarball("channel:nixpkgs-unstable")) {};
in pkgs.mkShell {
buildInputs = [
pkgs.clippy
pkgs.rust-analyzer
pkgs.rustup
pkgs.rustfmt
pkgs.xorg.libX11
pkgs.vulkan-tools
pkgs.glslang # or shaderc
pkgs.vulkan-headers
pkgs.vulkan-loader
pkgs.vulkan-validation-layers
pkgs.libGL
pkgs.libglvnd
pkgs.mesa
#pkgs.renderdoc
pkgs.pkg-config
pkgs.openssl
pkgs.clang
];
LD_LIBRARY_PATH = with pkgs.xorg; "${pkgs.glibc}/lib:${pkgs.mesa}/lib:${libX11}/lib:${libXcursor}/lib:${libXxf86vm}/lib:${libXi}/lib:${pkgs.xorg.libXrandr}/lib:${pkgs.libGL}/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib";
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
# Certain Rust tools won't work without this
# This can also be fixed by using oxalica/rust-overlay and specifying the rust-src extension
# See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/3?u=samuela. for more details.
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}