diff options
author | Kerstin Humm <kerstin@erictapen.name> | 2021-10-04 20:22:09 +0200 |
---|---|---|
committer | Kerstin Humm <kerstin@erictapen.name> | 2021-10-04 20:31:15 +0200 |
commit | 2e3b19b81d46ae9748d9d936c252e6e88c3157fb (patch) | |
tree | a7a53bce2fda97388290a2197ce7290a8e9c931a /pkgs/tools/graphics/wgpu-utils | |
parent | b995290d0badfffb984baed5531b0f5875b0864a (diff) |
wgpu: rename to wgpu-utils, use upstream tag
Diffstat (limited to 'pkgs/tools/graphics/wgpu-utils')
-rw-r--r-- | pkgs/tools/graphics/wgpu-utils/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/wgpu-utils/default.nix b/pkgs/tools/graphics/wgpu-utils/default.nix new file mode 100644 index 0000000000000..737f7132212c4 --- /dev/null +++ b/pkgs/tools/graphics/wgpu-utils/default.nix @@ -0,0 +1,36 @@ +{ lib, rustPlatform, fetchFromGitHub, pkg-config, makeWrapper, vulkan-loader }: + +rustPlatform.buildRustPackage rec { + pname = "wgpu-utils"; + version = "0.10.0"; + + src = fetchFromGitHub { + owner = "gfx-rs"; + repo = "wgpu"; + rev = "utils-${version}"; + sha256 = "sha256-bOUcLtT5iPZuUgor2d/pJQ4Y+I1LMzREgj1cwLAvd+s="; + }; + + cargoSha256 = "sha256-SSEG8JApQrgP7RWlXqb+xuy482oQZ5frE2IaVMruuG0="; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + # Tests fail, as the Nix sandbox doesn't provide an appropriate adapter (e.g. Vulkan). + doCheck = false; + + postInstall = '' + wrapProgram $out/bin/wgpu-info \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} + ''; + + meta = with lib; { + description = "Safe and portable GPU abstraction in Rust, implementing WebGPU API."; + homepage = "https://wgpu.rs/"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ erictapen ]; + mainProgram = "wgpu-info"; + }; +} |