update
This commit is contained in:
parent
d3b23639cd
commit
fcbb5f87ba
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/target/
|
||||
/.claude/
|
||||
/.direnv/
|
||||
/.direnv/
|
||||
/*.exe
|
||||
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
bevy = "0.16"
|
||||
bevy = { version = "0.16", features = ["wayland"] }
|
||||
bevy-inspector-egui = "0.33.1"
|
||||
bevy_panorbit_camera = "0.28"
|
||||
big_space = { version = "0.10.0", features = ["camera"] }
|
||||
@ -30,4 +30,4 @@ opt-level = 1
|
||||
opt-level = 3
|
||||
|
||||
[features]
|
||||
default = ["bevy/bevy_dev_tools", "bevy/dynamic_linking"]
|
||||
dev = ["bevy/bevy_dev_tools", "bevy/dynamic_linking"]
|
||||
|
||||
70
flake.nix
70
flake.nix
@ -7,44 +7,68 @@
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, rust-overlay, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
crossSystem = {
|
||||
config = "x86_64-w64-mingw32";
|
||||
};
|
||||
config.microsoftVisualStudioLicenseAccepted = true;
|
||||
};
|
||||
# I don't understand why we need this instead of just using pkgs.pkgsBuildHost,
|
||||
# but the wine64 from here works and the wine64 from pkgs.pkgsBuildHost doesn't.
|
||||
pkgsLocal = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
rust-toolchain = pkgs.pkgsBuildHost.rust-bin.stable.latest.default.override {
|
||||
extensions = [
|
||||
"rust-src"
|
||||
"rust-analyzer"
|
||||
];
|
||||
targets = [
|
||||
"wasm32-unknown-unknown"
|
||||
"x86_64-pc-windows-gnu"
|
||||
];
|
||||
};
|
||||
in
|
||||
with pkgs;
|
||||
{
|
||||
devShells.default = mkShell rec {
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
llvmPackages.bintools # To use lld linker
|
||||
rust-toolchain
|
||||
pkgsLocal.llvmPackages.bintools # To use lld linker
|
||||
pkgsLocal.openssl
|
||||
pkgsLocal.eza
|
||||
pkgsLocal.fd
|
||||
pkgsLocal.udev
|
||||
pkgsLocal.alsa-lib-with-plugins
|
||||
pkgsLocal.vulkan-loader
|
||||
pkgsLocal.xorg.libX11
|
||||
pkgsLocal.xorg.libXcursor
|
||||
pkgsLocal.xorg.libXi
|
||||
pkgsLocal.xorg.libXrandr # To use the x11 feature
|
||||
pkgsLocal.libxkbcommon
|
||||
pkgsLocal.wayland # To use the wayland feature
|
||||
pkgsLocal.clang
|
||||
pkgsLocal.nil
|
||||
pkgsLocal.nixfmt
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
pkg-config
|
||||
eza
|
||||
fd
|
||||
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
|
||||
extensions = [ "rust-src" "rust-analyzer" ];
|
||||
targets = [ "wasm32-unknown-unknown" ];
|
||||
}))
|
||||
udev
|
||||
alsa-lib-with-plugins
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXrandr # To use the x11 feature
|
||||
libxkbcommon
|
||||
wayland # To use the wayland feature
|
||||
clang
|
||||
pkgs.windows.pthreads
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath nativeBuildInputs;
|
||||
|
||||
shellHook = ''
|
||||
alias ls=exa
|
||||
|
||||
Loading…
Reference in New Issue
Block a user