at 23.05-pre 48 lines 1.1 kB view raw
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, help2man 5, installShellFiles 6, pkg-config 7, bzip2 8, xz 9, zlib 10, zstd 11}: 12 13rustPlatform.buildRustPackage rec { 14 pname = "ouch"; 15 version = "0.3.1"; 16 17 src = fetchFromGitHub { 18 owner = "ouch-org"; 19 repo = pname; 20 rev = version; 21 sha256 = "sha256-I9CgkYxcK+Ih9UlcYBa8QAZZsPvzPUK5ZUYKPxzgs38="; 22 }; 23 24 cargoSha256 = "sha256-jEprWtIl5LihD9fOMYHGGlk0+h4woUlwUWNfSkd2t10="; 25 26 nativeBuildInputs = [ help2man installShellFiles pkg-config ]; 27 28 buildInputs = [ bzip2 xz zlib zstd ]; 29 30 buildFeatures = [ "zstd/pkg-config" ]; 31 32 postInstall = '' 33 help2man $out/bin/ouch > ouch.1 34 installManPage ouch.1 35 36 completions=($releaseDir/build/ouch-*/out/completions) 37 installShellCompletion $completions/ouch.{bash,fish} --zsh $completions/_ouch 38 ''; 39 40 GEN_COMPLETIONS = 1; 41 42 meta = with lib; { 43 description = "A command-line utility for easily compressing and decompressing files and directories"; 44 homepage = "https://github.com/ouch-org/ouch"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ figsoda psibi ]; 47 }; 48}