website/flake.nix
Matthew Deville b7361bd083 Squashed commit of the following:
commit 9cba02c71e
Author: Matthew Deville <matthew@stockly.ai>
Date:   Mon Sep 28 21:49:33 2026 +0200

    boids

commit df85367414
Author: Matthew Deville <matthew@stockly.ai>
Date:   Mon Sep 28 12:18:10 2026 +0200

    trunk

commit bcf542f963
Author: Matthew Deville <matthew@stockly.ai>
Date:   Mon Sep 28 10:07:38 2026 +0200

    init biods
2026-09-28 21:52:00 +02:00

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}"
'';
};
};
};
}