3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/archivers/unrar/default.nix

46 lines
1,002 B
Nix
Raw Normal View History

{stdenv, fetchurl}:
2014-04-07 22:13:24 +01:00
stdenv.mkDerivation rec {
pname = "unrar";
version = "5.7.5";
src = fetchurl {
2017-10-12 18:17:22 +01:00
url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
sha256 = "1vp2pc1n5qhri0zr7fszlpjz8niw9x4cl47wbd9v323sm3dgvhp1";
};
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
'';
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 -D dll.hpp $out/include/unrar/dll.hpp
'';
2015-03-27 20:22:51 +00:00
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
2014-04-07 22:13:24 +01:00
description = "Utility for RAR archives";
homepage = http://www.rarlab.com/;
2016-01-02 11:30:28 +00:00
license = licenses.unfreeRedistributable;
maintainers = [ maintainers.ehmry ];
platforms = platforms.all;
2014-04-07 22:13:24 +01:00
};
}