2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, xz
|
|
|
|
, zlib
|
|
|
|
, zstd
|
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ouch";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.4.1";
|
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;
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-WzdKr0i31qNRm1EpMZ/W4fOfKKItmvz6BYFbJWcfoHo=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
cargoSha256 = "sha256-UhKcWpNuRNyA+uUw5kx84Y2F1Swr05m7JUM1+9lXYPM=";
|
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
|
|
|
};
|
|
|
|
}
|