1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 19:15:39 +00:00
nixpkgs/pkgs/tools/archivers/xarchiver/default.nix
pacien f8d0efbf37 xarchiver: replace unfree rar handler
Since version 0.5.4.11, Xarchiver supports using either unrar or unar to
unpack .rar files. The former being released under an unfree license,
using the latter by default is preferable.

This avoids indirectly guarding the xarchiver package under
`nixpkgs.config.allowUnfree` due to the dependency on unrar.

Users who would like to use the unfree implementation may do so by
adding the unrar package to the environment from which they are calling
xarchiver.
2021-07-16 04:43:51 +02:00

31 lines
969 B
Nix

{ lib, stdenv, fetchFromGitHub, gtk3, pkg-config, intltool, libxslt, makeWrapper,
coreutils, zip, unzip, p7zip, unar, gnutar, bzip2, gzip, lhasa, wrapGAppsHook }:
stdenv.mkDerivation rec {
version = "0.5.4.17";
pname = "xarchiver";
src = fetchFromGitHub {
owner = "ib";
repo = "xarchiver";
rev = version;
sha256 = "00adrjpxqlaccrwjf65w3vhxfswdj0as8aj263c6f9b85llypc5v";
};
nativeBuildInputs = [ intltool pkg-config makeWrapper wrapGAppsHook ];
buildInputs = [ gtk3 libxslt ];
postFixup = ''
wrapProgram $out/bin/xarchiver \
--prefix PATH : ${lib.makeBinPath [ zip unzip p7zip unar gnutar bzip2 gzip lhasa coreutils ]}
'';
meta = {
description = "GTK frontend to 7z,zip,rar,tar,bzip2, gzip,arj, lha, rpm and deb (open and extract only)";
homepage = "https://github.com/ib/xarchiver";
maintainers = [ lib.maintainers.domenkozar ];
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
};
}