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

49 lines
1 KiB
Nix
Raw Normal View History

{lib, stdenv, fetchurl}:
2014-04-07 23:13:24 +02:00
stdenv.mkDerivation rec {
pname = "unrar";
2020-04-07 23:36:22 +02:00
version = "5.9.2";
src = fetchurl {
2017-10-12 19:17:22 +02:00
url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
2020-04-07 23:36:22 +02:00
sha256 = "19nsxdvf9ll99hvgzq6f89ymxhwki224lygjdabrg8ghikqvmlvk";
};
2016-03-11 10:42:16 +01:00
postPatch = ''
substituteInPlace makefile \
--replace "CXX=" "#CXX=" \
--replace "STRIP=" "#STRIP=" \
--replace "AR=" "#AR="
2016-03-11 10:42:16 +01: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 21:22:51 +01:00
setupHook = ./setup-hook.sh;
meta = with lib; {
2014-04-07 23:13:24 +02:00
description = "Utility for RAR archives";
2020-04-07 23:36:22 +02:00
homepage = "https://www.rarlab.com/";
2016-01-02 12:30:28 +01:00
license = licenses.unfreeRedistributable;
maintainers = [ maintainers.ehmry ];
platforms = platforms.all;
2014-04-07 23:13:24 +02:00
};
}