You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
inputs = {
|
|
utils.url = "github:numtide/flake-utils";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
outputs = { self, nixpkgs, utils, rust-overlay }: utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
rust
|
|
|
|
# Linker toolchain (.cargo/config.toml: linker = "clang", -fuse-ld=lld)
|
|
clang
|
|
lld
|
|
|
|
# automatic rebuild
|
|
watchexec
|
|
|
|
# agent issue tracking
|
|
beans
|
|
|
|
# Like make, but just...
|
|
just
|
|
|
|
# Web toolchain
|
|
###
|
|
# $ cargo install -f wasm-bindgen-cli --version 0.2.122
|
|
# wasm-bindgen
|
|
###
|
|
# Provides: wasm-opt
|
|
binaryen
|
|
simple-http-server
|
|
|
|
# Bevy Linux dependencies
|
|
alsa-lib
|
|
libudev-zero
|
|
libxkbcommon
|
|
pkg-config
|
|
udev
|
|
vulkan-loader
|
|
wayland
|
|
libX11
|
|
libXcursor
|
|
libXi
|
|
libXrandr
|
|
];
|
|
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [ pkgs.vulkan-loader pkgs.wayland pkgs.libxkbcommon pkgs.udev pkgs.alsa-lib ]}:$LD_LIBRARY_PATH"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|