Skip to content

Commit d0cdd6d

Browse files
ky-beanLegNeato
authored andcommitted
Copy over default.nix from the rust-gpu repo, changing the name field to the name of this repo
1 parent f50053c commit d0cdd6d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

default.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
let
2+
pkgs = import <nixpkgs> {};
3+
in
4+
with pkgs;
5+
stdenv.mkDerivation rec {
6+
name = "rust-gpu-shadertoys";
7+
8+
# Workaround for https://github.com/NixOS/nixpkgs/issues/60919.
9+
# NOTE(eddyb) needed only in debug mode (warnings about needing optimizations
10+
# turn into errors due to `-Werror`, for at least `spirv-tools-sys`).
11+
hardeningDisable = ["fortify"];
12+
13+
# Allow cargo to download crates (even inside `nix-shell --pure`).
14+
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
15+
16+
nativeBuildInputs = [rustup];
17+
18+
# Runtime dependencies (for the example runners).
19+
LD_LIBRARY_PATH = with xorg;
20+
lib.makeLibraryPath [
21+
vulkan-loader
22+
23+
# NOTE(eddyb) winit really wants `libxkbcommon` on Wayland for some reason
24+
# (see https://github.com/rust-windowing/winit/issues/1760 for more info).
25+
wayland
26+
libxkbcommon
27+
28+
libX11
29+
libXcursor
30+
libXi
31+
libXrandr
32+
];
33+
}

0 commit comments

Comments
 (0)