Skip to content

Commit

Permalink
add: nix-shell to build and test on NixOS easily
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoneybun committed Oct 4, 2024
1 parent 72ec55b commit 8e63677
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ pkgs ? import <nixpkgs> {} }:
let
libPath = with pkgs; lib.makeLibraryPath [
libGL
libxkbcommon
wayland
];
in {
devShell = with pkgs; mkShell {
buildInputs = [
cargo
rustc
rust-analyzer
];

RUST_LOG = "debug";
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
LD_LIBRARY_PATH = libPath;
};
}

0 comments on commit 8e63677

Please sign in to comment.