nixpkgs/pkgs/tools/archivers/unrar/default.nix

49 lines
1.0 KiB
Nix
Raw Normal View History

{stdenv, fetchurl}:
2014-04-07 21:13:24 +00:00
stdenv.mkDerivation rec {
pname = "unrar";
2020-02-04 19:51:34 +00:00
version = "5.9.1";
src = fetchurl {
2017-10-12 17:17:22 +00:00
url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
2020-02-04 19:51:34 +00:00
sha256 = "0071inswykarjbg4a80fz4n9xdinjfvxd9kmwz5gq0i1w2wd3c8f";
};
2016-03-11 09:42:16 +00:00
postPatch = ''
substituteInPlace makefile \
--replace "CXX=" "#CXX=" \
--replace "STRIP=" "#STRIP=" \
--replace "AR=" "#AR="
2016-03-11 09:42:16 +00:00
'';
buildPhase = ''
make unrar
make clean
make lib
'';
outputs = [ "out" "dev" ];
installPhase = ''
install -Dt "$out/bin" unrar
mkdir -p $out/share/doc/unrar
cp acknow.txt license.txt \
$out/share/doc/unrar
install -Dm755 libunrar.so $out/lib/libunrar.so
install -Dt $dev/include/unrar/ *.hpp
'';
2015-03-27 20:22:51 +00:00
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
2014-04-07 21:13:24 +00:00
description = "Utility for RAR archives";
homepage = https://www.rarlab.com/;
2016-01-02 11:30:28 +00:00
license = licenses.unfreeRedistributable;
maintainers = [ maintainers.ehmry ];
platforms = platforms.all;
2014-04-07 21:13:24 +00:00
};
}