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

43 lines
918 B
Nix
Raw Normal View History

{stdenv, fetchurl}:
2014-04-07 23:13:24 +02:00
stdenv.mkDerivation rec {
2014-04-07 23:13:24 +02:00
name = "unrar-${version}";
2016-09-02 23:38:30 +02:00
version = "5.4.5";
src = fetchurl {
2014-04-07 23:13:24 +02:00
url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
2016-09-02 23:38:30 +02:00
sha256 = "0v3rz2245bp2nh4115ysqv34vqlrpln9y11fnlzqj8i46f2caw74";
};
2016-03-11 10:42:16 +01:00
postPatch = ''
sed 's/^CXX=g++/#CXX/' -i makefile
'';
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 21:22:51 +01:00
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
2014-04-07 23:13:24 +02:00
description = "Utility for RAR archives";
homepage = http://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
};
}