From 51888d5370911aecde4fa0a9a919470e6bacf2fd Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Wed, 15 Nov 2023 21:11:59 -0800 Subject: [PATCH] Added nix shell (switched from fedora) --- Cargo.lock | 38 -------------------------------------- Cargo.toml | 6 +++--- shell.nix | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 41 deletions(-) create mode 100644 shell.nix diff --git a/Cargo.lock b/Cargo.lock index 59829d2..ecff04f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,8 +646,6 @@ dependencies = [ "bevy_ecs", "bevy_utils", "console_error_panic_hook", - "tracing-chrome", - "tracing-error", "tracing-log", "tracing-subscriber", "tracing-wasm", @@ -810,7 +808,6 @@ dependencies = [ "naga", "naga_oil", "parking_lot", - "profiling", "regex", "ruzstd", "serde", @@ -2698,20 +2695,6 @@ name = "profiling" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" -dependencies = [ - "profiling-procmacros", - "tracing", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb156a45b6b9fe8027497422179fb65afc84d36707a7ca98297bf06bccb8d43f" -dependencies = [ - "quote", - "syn 2.0.39", -] [[package]] name = "quote" @@ -3157,17 +3140,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "tracing-chrome" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496b3cd5447f7ff527bbbf19b071ad542a000adf297d4127078b4dfdb931f41a" -dependencies = [ - "serde_json", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-core" version = "0.1.32" @@ -3178,16 +3150,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - [[package]] name = "tracing-log" version = "0.1.4" diff --git a/Cargo.toml b/Cargo.toml index 15adf5e..82b2e2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,10 +6,10 @@ build = "build.rs" [dependencies] bevy_fmod = { version = "0.3", features = ["live-update"] } -bevy = { version = "0.11", features = ["jpeg", "hdr", "trace", "trace_chrome"] } +bevy = { version = "0.11", features = ["jpeg", "hdr"] } [features] fmod = [] -[profile.release] -debug = true +[profile.dev] +opt-level = 3 diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..a6fc4c6 --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell rec { + nativeBuildInputs = [ + pkg-config + ]; + buildInputs = [ + rustup git-lfs clang udev alsa-lib vulkan-loader fmodex gcc gcc-unwrapped fmodex + xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature + libxkbcommon wayland # To use the wayland feature + ]; + LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; + + shellHook = '' + export LD_LIBRARY_PATH=lib/linux:$LD_LIBRARY_PATH + ''; +}