diff options
author | figsoda <figsoda@pm.me> | 2023-03-02 22:06:49 -0500 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2023-03-02 22:12:53 -0500 |
commit | 575ce45578210976798fabe2787fd1d45ba700d8 (patch) | |
tree | ab228ff0fdd29b9e7c48c908b5ff6ea1c61a50be | |
parent | ba01504a49596e23b3187190b7fe9910f083ce9d (diff) |
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
-rw-r--r-- | pkgs/development/tools/rust/typeshare/default.nix | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/pkgs/development/tools/rust/typeshare/default.nix b/pkgs/development/tools/rust/typeshare/default.nix index 6e96bf72bbad2..afcdedd9bf883 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 ]; }; |