nixpkgs/pkgs/tools/misc/vrc-get/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.3 KiB
Nix
Raw Normal View History

2024-11-11 05:35:19 +00:00
{ fetchCrate, installShellFiles, lib, rustPlatform, pkg-config, stdenv, buildPackages }:
2023-07-11 13:16:37 +00:00
rustPlatform.buildRustPackage rec {
pname = "vrc-get";
2024-10-16 04:44:11 +00:00
version = "1.8.2";
2023-07-11 13:16:37 +00:00
2024-04-07 08:23:48 +00:00
src = fetchCrate {
inherit pname version;
2024-10-16 04:44:11 +00:00
hash = "sha256-4ZiN9sl4VImb3ufF6L9k5t45tmV1RUSvm3NL52waj0o=";
2023-07-11 13:16:37 +00:00
};
nativeBuildInputs = [ installShellFiles pkg-config ];
2023-07-11 13:16:37 +00:00
2024-10-16 04:44:11 +00:00
cargoHash = "sha256-uPx9sujuvBp6wJzzqVlS8Rq1S9Cb2su9/gp4pnNJ9zQ=";
2023-07-11 13:16:37 +00:00
# Execute the resulting binary to generate shell completions, using emulation if necessary when cross-compiling.
# If no emulator is available, then give up on generating shell completions
postInstall =
let
vrc-get = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/vrc-get";
in
lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
installShellCompletion --cmd vrc-get \
--bash <(${vrc-get} completion bash) \
--fish <(${vrc-get} completion fish) \
--zsh <(${vrc-get} completion zsh)
'';
2023-07-11 13:16:37 +00:00
meta = with lib; {
description = "Command line client of VRChat Package Manager, the main feature of VRChat Creator Companion (VCC)";
2024-04-07 08:23:48 +00:00
homepage = "https://github.com/vrc-get/vrc-get";
2023-07-11 13:16:37 +00:00
license = licenses.mit;
maintainers = with maintainers; [ bddvlpr ];
2023-11-27 01:17:53 +00:00
mainProgram = "vrc-get";
2023-07-11 13:16:37 +00:00
};
}