2007-06-24 15:34:44 +00:00
|
|
|
{stdenv, fetchurl}:
|
2014-04-07 21:13:24 +00:00
|
|
|
|
2016-03-05 06:15:46 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2014-04-07 21:13:24 +00:00
|
|
|
name = "unrar-${version}";
|
2016-09-02 21:38:30 +00:00
|
|
|
version = "5.4.5";
|
2007-06-24 15:34:44 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-04-07 21:13:24 +00:00
|
|
|
url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
|
2016-09-02 21:38:30 +00:00
|
|
|
sha256 = "0v3rz2245bp2nh4115ysqv34vqlrpln9y11fnlzqj8i46f2caw74";
|
2007-06-24 15:34:44 +00:00
|
|
|
};
|
|
|
|
|
2016-03-11 09:42:16 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed 's/^CXX=g++/#CXX/' -i makefile
|
|
|
|
'';
|
|
|
|
|
2016-03-05 06:15:46 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make unrar
|
|
|
|
make clean
|
|
|
|
make lib
|
2014-12-17 18:11:30 +00:00
|
|
|
'';
|
|
|
|
|
2010-01-07 22:42:25 +00:00
|
|
|
installPhase = ''
|
2015-12-05 12:59:05 +00:00
|
|
|
install -Dt "$out/bin" unrar
|
2014-09-05 14:14:36 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/doc/unrar
|
|
|
|
cp acknow.txt license.txt \
|
|
|
|
$out/share/doc/unrar
|
2016-03-05 06:15:46 +00:00
|
|
|
|
|
|
|
install -Dm755 libunrar.so $out/lib/libunrar.so
|
|
|
|
install -D dll.hpp $out/include/unrar/dll.hpp
|
2010-01-07 22:42:25 +00:00
|
|
|
'';
|
2007-06-24 15:34:44 +00:00
|
|
|
|
2015-03-27 20:22:51 +00:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2014-09-05 14:14:36 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-04-07 21:13:24 +00:00
|
|
|
description = "Utility for RAR archives";
|
2014-09-05 14:14:36 +00:00
|
|
|
homepage = http://www.rarlab.com/;
|
2016-01-02 11:30:28 +00:00
|
|
|
license = licenses.unfreeRedistributable;
|
2015-12-05 21:41:25 +00:00
|
|
|
maintainers = [ maintainers.ehmry ];
|
2014-09-05 14:14:36 +00:00
|
|
|
platforms = platforms.all;
|
2014-04-07 21:13:24 +00:00
|
|
|
};
|
2007-06-24 15:34:44 +00:00
|
|
|
}
|