diff --git a/pkgs/by-name/ou/ouch/package.nix b/pkgs/by-name/ou/ouch/package.nix index 539f64907e9b..f3574b3d23a1 100644 --- a/pkgs/by-name/ou/ouch/package.nix +++ b/pkgs/by-name/ou/ouch/package.nix @@ -10,6 +10,10 @@ git, zlib, zstd, + + # RAR code is under non-free unRAR license + # see the meta.license section below for more details + enableUnfree ? false, }: rustPlatform.buildRustPackage rec { @@ -44,7 +48,17 @@ rustPlatform.buildRustPackage rec { zstd ]; - buildFeatures = [ "zstd/pkg-config" ]; + buildNoDefaultFeatures = true; + buildFeatures = + [ + "use_zlib" + "use_zstd_thin" + # "bzip3" will be optional in the next version + "zstd/pkg-config" + ] + ++ lib.optionals enableUnfree [ + "unrar" + ]; postInstall = '' installManPage artifacts/*.1 @@ -57,7 +71,7 @@ rustPlatform.buildRustPackage rec { description = "Command-line utility for easily compressing and decompressing files and directories"; homepage = "https://github.com/ouch-org/ouch"; changelog = "https://github.com/ouch-org/ouch/blob/${version}/CHANGELOG.md"; - license = lib.licenses.mit; + license = with lib.licenses; [ mit ] ++ lib.optionals enableUnfree [ unfreeRedistributable ]; maintainers = with lib.maintainers; [ figsoda psibi