website/flake.nix

61 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2026-02-20 12:46:05 +00:00
{
description = "Bevy WASM website";
inputs = {
2026-09-14 16:19:58 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
2026-02-20 12:46:05 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2026-09-28 08:07:38 +00:00
outputs =
inputs@{
flake-parts,
nixpkgs,
rust-overlay,
...
}:
2026-09-14 16:19:58 +00:00
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
2026-09-28 08:07:38 +00:00
perSystem =
{ pkgs, system, ... }:
2026-09-14 16:19:58 +00:00
let
overlays = [ (import rust-overlay) ];
rustPkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = rustPkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
2026-09-28 10:18:10 +00:00
runtimeDeps = with pkgs; [
alsa-lib
udev
vulkan-loader
wayland
libxkbcommon
];
2026-09-14 16:19:58 +00:00
in
{
devShells.default = pkgs.mkShell {
2026-09-28 10:18:10 +00:00
packages = with pkgs; [
pkg-config
2026-09-14 16:19:58 +00:00
rustToolchain
2026-09-28 10:18:10 +00:00
trunk
2026-09-14 16:19:58 +00:00
];
2026-09-28 10:18:10 +00:00
buildInputs = runtimeDeps;
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath runtimeDeps}"
'';
2026-09-14 16:19:58 +00:00
};
2026-02-20 12:46:05 +00:00
};
2026-09-14 16:19:58 +00:00
};
2026-02-20 12:46:05 +00:00
}