From 930bbd29f7fb768bd6ca89a4282b1c5de0bed8e1 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 22 Apr 2026 22:37:56 +0300 Subject: [PATCH] pdfcpu: 0.11.1 -> 0.12.0 Diff: https://github.com/pdfcpu/pdfcpu/compare/v0.11.1...v0.12.0 --- pkgs/by-name/pd/pdfcpu/package.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pd/pdfcpu/package.nix b/pkgs/by-name/pd/pdfcpu/package.nix index 818a0295951c..38f4f4b51726 100644 --- a/pkgs/by-name/pd/pdfcpu/package.nix +++ b/pkgs/by-name/pd/pdfcpu/package.nix @@ -4,17 +4,18 @@ stdenv, fetchFromGitHub, writableTmpDirAsHomeHook, + installShellFiles, }: buildGoModule (finalAttrs: { pname = "pdfcpu"; - version = "0.11.1"; + version = "0.12.0"; src = fetchFromGitHub { owner = "pdfcpu"; repo = "pdfcpu"; tag = "v${finalAttrs.version}"; - hash = "sha256-0xsa7/WlqjRMP961FTonfty40+C1knI3szCmCDfZJ/0="; + hash = "sha256-qCSfcxeMM7HzJIaeZJxjUVc834NmigpDKaxFQ0oSdkg="; # Apparently upstream requires that the compiled executable will know the # commit hash and the date of the commit. This information is also presented # in the output of `pdfcpu version` which we use as a sanity check in the @@ -37,7 +38,7 @@ buildGoModule (finalAttrs: { ''; }; - vendorHash = "sha256-wZYYIcPhyDlmIhuJs91EqPB8AjLIDHz39lXh35LHUwQ="; + vendorHash = "sha256-5+zHlHp/8Jp9TE87IUgJqQHDINNe7ah34jPW/n5ORz8="; ldflags = [ "-s" @@ -51,6 +52,17 @@ buildGoModule (finalAttrs: { ldflags+=" -X main.date=$(cat SOURCE_DATE)" ''; + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installShellCompletion --cmd pdfcpu \ + --zsh <($out/bin/pdfcpu completion zsh) \ + --fish <($out/bin/pdfcpu completion fish) \ + --bash <($out/bin/pdfcpu completion bash) + ''; + # No tests doCheck = false; doInstallCheck = true;