2021-01-11 08:54:33 +01:00
|
|
|
{lib, stdenv, fetchurl}:
|
2014-04-07 23:13:24 +02:00
|
|
|
|
2016-03-05 07:15:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "unrar";
|
2020-04-07 23:36:22 +02:00
|
|
|
version = "5.9.2";
|
2007-06-24 17:34:44 +02:00
|
|
|
|
|
|
|
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";
|
2007-06-24 17:34:44 +02:00
|
|
|
};
|
|
|
|
|
2016-03-11 10:42:16 +01:00
|
|
|
postPatch = ''
|
2018-01-11 21:15:04 +01:00
|
|
|
substituteInPlace makefile \
|
|
|
|
--replace "CXX=" "#CXX=" \
|
|
|
|
--replace "STRIP=" "#STRIP=" \
|
|
|
|
--replace "AR=" "#AR="
|
2016-03-11 10:42:16 +01:00
|
|
|
'';
|
|
|
|
|
2016-03-05 07:15:46 +01:00
|
|
|
buildPhase = ''
|
|
|
|
make unrar
|
|
|
|
make clean
|
|
|
|
make lib
|
2014-12-17 19:11:30 +01:00
|
|
|
'';
|
|
|
|
|
2020-01-23 18:31:23 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2010-01-07 23:42:25 +01:00
|
|
|
installPhase = ''
|
2015-12-05 13:59:05 +01:00
|
|
|
install -Dt "$out/bin" unrar
|
2014-09-05 16:14:36 +02:00
|
|
|
|
|
|
|
mkdir -p $out/share/doc/unrar
|
|
|
|
cp acknow.txt license.txt \
|
|
|
|
$out/share/doc/unrar
|
2016-03-05 07:15:46 +01:00
|
|
|
|
|
|
|
install -Dm755 libunrar.so $out/lib/libunrar.so
|
2020-01-23 18:31:23 +01:00
|
|
|
|
|
|
|
install -Dt $dev/include/unrar/ *.hpp
|
2010-01-07 23:42:25 +01:00
|
|
|
'';
|
2007-06-24 17:34:44 +02:00
|
|
|
|
2015-03-27 21:22:51 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
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;
|
2015-12-05 22:41:25 +01:00
|
|
|
maintainers = [ maintainers.ehmry ];
|
2014-09-05 16:14:36 +02:00
|
|
|
platforms = platforms.all;
|
2014-04-07 23:13:24 +02:00
|
|
|
};
|
2007-06-24 17:34:44 +02:00
|
|
|
}
|