From 575ce45578210976798fabe2787fd1d45ba700d8 Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 2 Mar 2023 22:06:49 -0500 Subject: [PATCH] typeshare: 1.0.1 -> 1.1.0 Diff: https://github.com/1password/typeshare/compare/v1.0.1...v1.1.0 Changelog: https://github.com/1password/typeshare/blob/v1.1.0/CHANGELOG.md --- .../tools/rust/typeshare/default.nix | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/rust/typeshare/default.nix b/pkgs/development/tools/rust/typeshare/default.nix index 6e96bf72bbad..afcdedd9bf88 100644 --- a/pkgs/development/tools/rust/typeshare/default.nix +++ b/pkgs/development/tools/rust/typeshare/default.nix @@ -1,22 +1,37 @@ -{ lib, rustPlatform, fetchCrate }: +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +}: rustPlatform.buildRustPackage rec { pname = "typeshare"; - version = "1.0.1"; + version = "1.1.0"; - src = fetchCrate { - inherit version; - pname = "typeshare-cli"; - sha256 = "sha256-SbTI7170Oc1e09dv4TvUwByG3qkyAL5YXZ96NzI0FSI="; + src = fetchFromGitHub { + owner = "1password"; + repo = "typeshare"; + rev = "v${version}"; + hash = "sha256-FQ9KL8X7zz3ew+H1lhh4bkZ01Te1TD+QXAMxS8dXAaI="; }; - cargoSha256 = "sha256-5EhXw2WcRJqCbdMvOtich9EYQqi0uwCH1a1XXIo8aAo="; + cargoHash = "sha256-t6tGNHmPasmTRto2hobvJywrF/8tO79zkfWwa6lCPK8="; + + nativeBuildInputs = [ installShellFiles ]; buildFeatures = [ "go" ]; + postInstall = '' + installShellCompletion --cmd typeshare \ + --bash <($out/bin/typeshare completions bash) \ + --fish <($out/bin/typeshare completions fish) \ + --zsh <($out/bin/typeshare completions zsh) + ''; + meta = with lib; { description = "Command Line Tool for generating language files with typeshare"; homepage = "https://github.com/1password/typeshare"; + changelog = "https://github.com/1password/typeshare/blob/v${version}/CHANGELOG.md"; license = with licenses; [ asl20 /* or */ mit ]; maintainers = with maintainers; [ figsoda ]; };