3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/compression/ouch/default.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2021-11-11 14:05:34 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, help2man
, installShellFiles
, pkg-config
, bzip2
, xz
, zlib
, zstd
}:
2021-07-26 03:49:29 +01:00
rustPlatform.buildRustPackage rec {
pname = "ouch";
2021-11-02 20:35:25 +00:00
version = "0.3.1";
2021-07-26 03:49:29 +01:00
src = fetchFromGitHub {
2021-10-07 08:08:21 +01:00
owner = "ouch-org";
2021-07-26 03:49:29 +01:00
repo = pname;
rev = version;
2021-11-02 20:35:25 +00:00
sha256 = "sha256-I9CgkYxcK+Ih9UlcYBa8QAZZsPvzPUK5ZUYKPxzgs38=";
2021-07-26 03:49:29 +01:00
};
2021-11-02 20:35:25 +00:00
cargoSha256 = "sha256-jEprWtIl5LihD9fOMYHGGlk0+h4woUlwUWNfSkd2t10=";
2021-11-11 14:05:34 +00:00
nativeBuildInputs = [ help2man installShellFiles pkg-config ];
buildInputs = [ bzip2 xz zlib zstd ];
2021-11-16 00:26:03 +00:00
buildFeatures = [ "zstd/pkg-config" ];
2021-11-02 20:35:25 +00:00
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;
2021-07-26 03:49:29 +01:00
meta = with lib; {
2021-10-07 08:08:21 +01:00
description = "A command-line utility for easily compressing and decompressing files and directories";
homepage = "https://github.com/ouch-org/ouch";
2021-07-26 03:49:29 +01:00
license = licenses.mit;
2021-11-02 20:35:25 +00:00
maintainers = with maintainers; [ figsoda psibi ];
2021-07-26 03:49:29 +01:00
};
}