Commit bb764382 authored by Emily's avatar Emily
Browse files

Revert "wgpu: init at 22.1.0"

This package was added in
<https://github.com/NixOS/nixpkgs/pull/345248> to address
<https://github.com/NixOS/nixpkgs/issues/344689>, a request for a
package of wgpu-native, wgpu’s native WebGPU implementation that
other applications can use as a library.

However, it doesn’t package that at all; instead, it contains
only several binary utility and example programs shipped as part
of wgpu, and in fact, these were already present as the more
appropriately‐named `wgpu-utils` package, which needs only an update.

Given that this package was added without the due diligence to check
whether the software being packaged was what was being requested,
or whether it was already present under an obvious name, I don’t
think there’s an argument for retaining this duplicate. `wgpu-utils`
can be updated and refactored to be on par with this package, and if
the library that was actually requested is ever packaged, it should
be called `wgpu-native` instead.

This reverts commit 27e304c0.
parent 9ee9cac8
Loading
Loading
Loading
Loading

pkgs/by-name/wg/wgpu/Cargo.lock

deleted100644 → 0
+0 −4946

File deleted.

Preview size limit exceeded, changes collapsed.

pkgs/by-name/wg/wgpu/package.nix

deleted100644 → 0
+0 −65
Original line number Diff line number Diff line
{
  rustPlatform,
  lib,
  fetchFromGitHub,
  nix-update-script,
  cmake,
  pkg-config,
  fontconfig,
  stdenv,
  darwin,
}:

rustPlatform.buildRustPackage rec {
  pname = "wgpu";
  version = "22.1.0";

  src = fetchFromGitHub {
    owner = "gfx-rs";
    repo = "wgpu";
    rev = "refs/tags/wgpu-v${version}";
    hash = "sha256-Gtq0xYZoWNwW+BKVLqVVKGqc+4HjaD7NN1hlzyFP5g0=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "noise-0.8.2" = "sha256-7GvShJeSNfwMCBIfqLghXgKQv7EDMqVchJw0uxPhNr4=";
      "rspirv-0.11.0+sdk-1.2.198" = "sha256-AcJqkcXBr/+SHdUDXd63sQ0h5eosMqRhV4aUREJH8Bw=";
    };
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs =
    [
      fontconfig
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin (
      with darwin.apple_sdk.frameworks;
      [
        CoreServices
        QuartzCore
        AppKit
      ]
    );

  #requires GPU
  doCheck = false;

  passthru.updateScript = nix-update-script { };

  meta = {
    homepage = "https://wgpu.rs/";
    description = "Cross-platform, safe, pure-Rust graphics API.";
    changelog = "https://github.com/gfx-rs/wgpu/releases/tag/v${version}";
    maintainers = with lib.maintainers; [ bot-wxt1221 ];
    license = with lib.licenses; [
      mit
      apsl20
    ];
  };
}