60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{
|
|
description = "Bevy WASM website";
|
|
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{
|
|
flake-parts,
|
|
nixpkgs,
|
|
rust-overlay,
|
|
...
|
|
}:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
|
|
perSystem =
|
|
{ pkgs, system, ... }:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
rustPkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
rustToolchain = rustPkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
runtimeDeps = with pkgs; [
|
|
alsa-lib
|
|
udev
|
|
vulkan-loader
|
|
wayland
|
|
libxkbcommon
|
|
];
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
pkg-config
|
|
rustToolchain
|
|
trunk
|
|
];
|
|
|
|
buildInputs = runtimeDeps;
|
|
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath runtimeDeps}"
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|