Commit bbd88210 authored by Niklas Korz's avatar Niklas Korz
Browse files
parent 597f7b04
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -9,15 +9,15 @@
  callPackage,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "wgpu-native";
  version = "25.0.2.2";
  version = "27.0.2.0";

  src = fetchFromGitHub {
    owner = "gfx-rs";
    repo = "wgpu-native";
    tag = "v${version}";
    hash = "sha256-ihA1pfTW6EHpihL4IUv7YTsU1SLkxEM6wUDr7NiHmLc=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-sJEDCt8DTP6FjtbROVCZVD0we0OA07wjkiLnXoQfTuc=";
    fetchSubmodules = true;
  };

@@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
    "dev"
  ];

  cargoHash = "sha256-8Axm9gIX6yW0ScV5SjB6AWlmlIeGuQYonWsGwcIH2os=";
  cargoHash = "sha256-ZQiX7IZsbjlDzRNlYgpRnLfCKGAYnSwvACRMNkZPjbE=";

  nativeBuildInputs = [
    rustPlatform.bindgenHook
@@ -37,6 +37,8 @@ rustPlatform.buildRustPackage rec {
    vulkan-loader
  ];

  env.WGPU_NATIVE_VERSION = finalAttrs.version;

  postInstall = ''
    rm $out/lib/libwgpu_native.a
    install -Dm644 ./ffi/wgpu.h -t $dev/include/webgpu
@@ -46,7 +48,7 @@ rustPlatform.buildRustPackage rec {
  passthru = {
    updateScript = nix-update-script { };
    examples = callPackage ./examples.nix {
      inherit version src;
      inherit (finalAttrs) version src;
    };
  };

@@ -59,4 +61,4 @@ rustPlatform.buildRustPackage rec {
    ];
    maintainers = with lib.maintainers; [ niklaskorz ];
  };
}
})