aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:22 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:22 +0100
commit5998f9a8348306ba95e0262a9215808b1eeffb44 (patch)
tree9fd49f6185936db56d331015ab02a11e523bc3b1
parentb688a25810840c5ebf4bf2c18bbdae52c62f6b4d (diff)
chore(all): nix environment
-rwxr-xr-x.envrc1
-rwxr-xr-xshell.nix33
2 files changed, 34 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100755
index 0000000..051d09d
--- /dev/null
+++ b/.envrc
@@ -0,0 +1 @@
+eval "$(lorri direnv)"
diff --git a/shell.nix b/shell.nix
new file mode 100755
index 0000000..ad67225
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,33 @@
+{ pkgs ? import <nixpkgs> {}, lib ? pkgs.stdenv.lib }:
+
+pkgs.mkShell rec {
+ buildInputs = with pkgs;[
+ # Rust
+ rustup
+
+ # shaderc
+ shaderc.bin
+ shaderc.lib
+
+ # Build script dependencies
+ gcc
+ pkg-config
+
+ # Necessary X11 libraries
+ xorg.libX11
+ xorg.libXcursor
+ xorg.libXrandr
+ xorg.libXi
+
+ # Vulkan
+ vulkan-loader
+ vulkan-validation-layers
+
+ # Optional, but useful for debugging
+ renderdoc
+ ];
+
+ LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
+
+ SHADERC_LIB_DIR = "${pkgs.shaderc.lib}/lib/";
+} \ No newline at end of file