2021-11-11 15:05:34 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, help2man
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, xz
|
|
|
|
, zlib
|
|
|
|
, zstd
|
|
|
|
}:
|
2021-07-26 04:49:29 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ouch";
|
2023-01-05 23:35:37 +01:00
|
|
|
version = "0.4.1";
|
2021-07-26 04:49:29 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-10-07 09:08:21 +02:00
|
|
|
owner = "ouch-org";
|
2021-07-26 04:49:29 +02:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-01-05 23:35:37 +01:00
|
|
|
sha256 = "sha256-WzdKr0i31qNRm1EpMZ/W4fOfKKItmvz6BYFbJWcfoHo=";
|
2021-07-26 04:49:29 +02:00
|
|
|
};
|
|
|
|
|
2023-01-05 23:35:37 +01:00
|
|
|
cargoSha256 = "sha256-UhKcWpNuRNyA+uUw5kx84Y2F1Swr05m7JUM1+9lXYPM=";
|
2021-11-02 21:35:25 +01:00
|
|
|
|
2022-11-23 23:31:10 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2021-11-11 15:05:34 +01:00
|
|
|
|
|
|
|
buildInputs = [ bzip2 xz zlib zstd ];
|
|
|
|
|
2021-11-16 01:26:03 +01:00
|
|
|
buildFeatures = [ "zstd/pkg-config" ];
|
2021-11-02 21:35:25 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-11-23 23:31:10 +01:00
|
|
|
installManPage artifacts/*.1
|
|
|
|
installShellCompletion artifacts/ouch.{bash,fish} --zsh artifacts/_ouch
|
2021-11-02 21:35:25 +01:00
|
|
|
'';
|
|
|
|
|
2022-11-23 23:31:10 +01:00
|
|
|
OUCH_ARTIFACTS_FOLDER = "artifacts";
|
2021-07-26 04:49:29 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-07 09:08:21 +02:00
|
|
|
description = "A command-line utility for easily compressing and decompressing files and directories";
|
|
|
|
homepage = "https://github.com/ouch-org/ouch";
|
2022-11-23 23:31:10 +01:00
|
|
|
changelog = "https://github.com/ouch-org/ouch/blob/${version}/CHANGELOG.md";
|
2021-07-26 04:49:29 +02:00
|
|
|
license = licenses.mit;
|
2021-11-02 21:35:25 +01:00
|
|
|
maintainers = with maintainers; [ figsoda psibi ];
|
2021-07-26 04:49:29 +02:00
|
|
|
};
|
|
|
|
}
|