summary refs log tree commit diff
path: root/pkgs/development/tools/buf/default.nix
diff options
context:
space:
mode:
authorAaron Jheng <wentworth@outlook.com>2022-02-03 03:03:15 +0000
committerAaron Jheng <wentworth@outlook.com>2022-02-03 05:43:04 +0000
commit7fbf10b51942ff6e01225849726b4c59efa391e5 (patch)
tree0156aa2c9611dc479c781018c89e06aabbe75a5c /pkgs/development/tools/buf/default.nix
parentebd52e4984e44283adbc2746274b3936983cb5d7 (diff)
downloadnixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar.gz
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar.bz2
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar.lz
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar.xz
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.tar.zst
nixpkgs-7fbf10b51942ff6e01225849726b4c59efa391e5.zip
buf: 1.0.0-rc11 -> 1.0.0-rc12
Diffstat (limited to 'pkgs/development/tools/buf/default.nix')
-rw-r--r--pkgs/development/tools/buf/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/tools/buf/default.nix b/pkgs/development/tools/buf/default.nix
index 51460731784..67c132bd9e0 100644
--- a/pkgs/development/tools/buf/default.nix
+++ b/pkgs/development/tools/buf/default.nix
@@ -5,19 +5,20 @@
 , git
 , testVersion
 , buf
+, installShellFiles
 }:
 
 buildGoModule rec {
   pname = "buf";
-  version = "1.0.0-rc11";
+  version = "1.0.0-rc12";
 
   src = fetchFromGitHub {
     owner = "bufbuild";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-V6xaGnSoKuJC59uZLW8uSLqwseJHvLGjrvhzE8o9fho=";
+    sha256 = "sha256-UqyWQdlCDTSjW348f87W7g2kwB5nzIOviSE5/1T1soY=";
   };
-  vendorSha256 = "sha256-442NHTREM2zC8VA7zAV35YSwX1lM/BXnx6p8a+avzps=";
+  vendorSha256 = "sha256-qBgGZTok3G0Pgku76uiV9bZperhiSNoWSrzxrHe4QXw=";
 
   patches = [
     # Skip a test that requires networking to be available to work.
@@ -26,7 +27,7 @@ buildGoModule rec {
     ./skip_test_requiring_dotgit.patch
   ];
 
-  nativeBuildInputs = [ protobuf ];
+  nativeBuildInputs = [ protobuf installShellFiles ];
   # Required for TestGitCloner
   checkInputs = [ git ];
 
@@ -42,6 +43,7 @@ buildGoModule rec {
   installPhase = ''
     runHook preInstall
 
+    # Binaries
     mkdir -p "$out/bin"
     # Only install required binaries, don't install testing binaries
     for FILE in \
@@ -51,6 +53,16 @@ buildGoModule rec {
       cp "$GOPATH/bin/$FILE" "$out/bin/"
     done
 
+    # Completions
+    installShellCompletion --cmd buf \
+      --bash <($GOPATH/bin/buf bash-completion) \
+      --fish <($GOPATH/bin/buf fish-completion) \
+      --zsh <($GOPATH/bin/buf zsh-completion)
+
+    # Man Pages
+    mkdir man && $GOPATH/bin/buf manpages man
+    installManPage man/*
+
     runHook postInstall
   '';