depot/third_party/nixpkgs/pkgs/tools/compression/ouch/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

48 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, help2man
, installShellFiles
, pkg-config
, bzip2
, xz
, zlib
, zstd
}:
rustPlatform.buildRustPackage rec {
pname = "ouch";
version = "0.3.1";
src = fetchFromGitHub {
owner = "ouch-org";
repo = pname;
rev = version;
sha256 = "sha256-I9CgkYxcK+Ih9UlcYBa8QAZZsPvzPUK5ZUYKPxzgs38=";
};
cargoSha256 = "sha256-jEprWtIl5LihD9fOMYHGGlk0+h4woUlwUWNfSkd2t10=";
nativeBuildInputs = [ help2man installShellFiles pkg-config ];
buildInputs = [ bzip2 xz zlib zstd ];
buildFeatures = [ "zstd/pkg-config" ];
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 = with maintainers; [ figsoda psibi ];
};
}