From 89a4fa94d794b28bb3fa6a343724ed7837c18d95 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 2 Nov 2021 16:35:25 -0400 Subject: [PATCH] ouch: 0.2.0 -> 0.3.1 --- pkgs/tools/compression/ouch/default.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/compression/ouch/default.nix b/pkgs/tools/compression/ouch/default.nix index c451b40fcf5c..fc2e2642cf8d 100644 --- a/pkgs/tools/compression/ouch/default.nix +++ b/pkgs/tools/compression/ouch/default.nix @@ -1,22 +1,34 @@ -{ lib, rustPlatform, fetchFromGitHub }: +{ lib, rustPlatform, fetchFromGitHub, help2man, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "ouch"; - version = "0.2.0"; + version = "0.3.1"; src = fetchFromGitHub { owner = "ouch-org"; repo = pname; rev = version; - sha256 = "sha256-OhEr/HvwgDkB8h3cpayOlnrs6OXiwAsQUH9XGqi5rpc="; + sha256 = "sha256-I9CgkYxcK+Ih9UlcYBa8QAZZsPvzPUK5ZUYKPxzgs38="; }; - cargoSha256 = "sha256-lKsB75Lb9IYS80qu4jaIpnbEOr4Ow9M5S45Kk03An2o="; + cargoSha256 = "sha256-jEprWtIl5LihD9fOMYHGGlk0+h4woUlwUWNfSkd2t10="; + + nativeBuildInputs = [ help2man installShellFiles ]; + + postInstall = '' + help2man $out/bin/ouch > ouch.1 + installManPage ouch.1 + + completions=($releaseDir/build/ouch-*/out/completions) + installShellCompletion $completions/ouch.{bash,fish} --zsh $completions/_ouch + ''; + + GEN_COMPLETIONS = 1; meta = with lib; { description = "A command-line utility for easily compressing and decompressing files and directories"; homepage = "https://github.com/ouch-org/ouch"; license = licenses.mit; - maintainers = [ maintainers.psibi ]; + maintainers = with maintainers; [ figsoda psibi ]; }; }