From 131989d9f321f8b335417d3ca2cddb5e831b883d Mon Sep 17 00:00:00 2001 From: lily Date: Wed, 23 Apr 2025 17:42:45 -0400 Subject: [PATCH] fix(nix): incorrect namespace for `vulkan-loader`, add `cargo-zigbuild` --- default.nix | 6 +++--- flake.nix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 1aa9adf..02ab55a 100644 --- a/default.nix +++ b/default.nix @@ -13,7 +13,7 @@ stdenv, targetPackages ? pkgs, }: let - version = (builtins.fromTOML (builtins.readFile ./engine/Cargo.toml)).package.version; + version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version; src = nix-gitignore.gitignoreSource [] ./.; in rustPlatform.buildRustPackage rec { @@ -61,7 +61,7 @@ rustPlatform.buildRustPackage rec { --set LD_LIBRARY_PATH ${lib.makeLibraryPath buildInputs} '' + lib.optionalString stdenv.targetPlatform.isWindows '' mkdir -p $out/bin - cp ${targetPackages.vulkan-loader}/bin/vulkan-1.dll $out/bin/ + cp ${pkgs.vulkan-loader}/bin/vulkan-1.dll $out/bin/ ''; doCheck = false; @@ -72,4 +72,4 @@ rustPlatform.buildRustPackage rec { platforms = lib.platforms.all; mainProgram = "zenyx"; }; -} \ No newline at end of file +} diff --git a/flake.nix b/flake.nix index 21466a2..101719c 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ cargo-cross cargo-xwin cargo-wizard + cargo-zigbuild wine64 pkg-config ];