wgpu: init at 0.10.0

This commit is contained in:
Kerstin Humm 2021-10-03 17:37:26 +02:00
parent 0b672c78ab
commit e6bdd9690c
No known key found for this signature in database
GPG Key ID: 40293358C7B9326B
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,36 @@
{ lib, rustPlatform, fetchFromGitHub, pkg-config, makeWrapper, vulkan-loader }:
rustPlatform.buildRustPackage rec {
pname = "wgpu";
version = "0.10.0";
src = fetchFromGitHub {
owner = "gfx-rs";
repo = pname;
rev = "9da5c1d3a026c275feb57606b8c8d61f82b43386";
sha256 = "sha256-DcIMP06tlMxI16jqpKqei32FY8h7z41Nvygap2MQC8A=";
};
cargoSha256 = "sha256-3gtIx337IP5t4nYGysOaU7SZRJrvVjYXN7mAqGbVlo8=";
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";
};
}

View File

@ -10481,6 +10481,8 @@ with pkgs;
});
};
wgpu = callPackage ../tools/graphics/wgpu { };
wg-bond = callPackage ../applications/networking/wg-bond { };
which = callPackage ../tools/system/which { };