2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, help2man
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, xz
|
|
|
|
, zlib
|
|
|
|
, zstd
|
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ouch";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.4.0";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-10-07 14:46:35 +00:00
|
|
|
owner = "ouch-org";
|
2021-08-05 21:33:18 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-11-27 09:42:12 +00:00
|
|
|
sha256 = "sha256-XB0J7Qeru+FX5YprepglfTndS8b3zsAw1b9mc4n6EdA=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
cargoSha256 = "sha256-aW1aDXxs64ScocrnlsGy2+NAs6aC8F0/S1f32f9BDJU=";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildInputs = [ bzip2 xz zlib zstd ];
|
|
|
|
|
|
|
|
buildFeatures = [ "zstd/pkg-config" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-11-27 09:42:12 +00:00
|
|
|
installManPage artifacts/*.1
|
|
|
|
installShellCompletion artifacts/ouch.{bash,fish} --zsh artifacts/_ouch
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
OUCH_ARTIFACTS_FOLDER = "artifacts";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-07 14:46:35 +00:00
|
|
|
description = "A command-line utility for easily compressing and decompressing files and directories";
|
|
|
|
homepage = "https://github.com/ouch-org/ouch";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/ouch-org/ouch/blob/${version}/CHANGELOG.md";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ figsoda psibi ];
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|