2020-05-03 17:38:23 +00:00
|
|
|
{ stdenv, fetchFromGitHub, installShellFiles, gnustep, bzip2, zlib, icu, openssl, wavpack }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "unar";
|
2020-05-03 17:38:23 +00:00
|
|
|
version = "1.10.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MacPaw";
|
|
|
|
# the unar repo contains a shallow clone of both XADMaster and universal-detector
|
|
|
|
repo = "unar";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0p846q1l66k3rnd512sncp26zpv411b8ahi145sghfcsz9w8abc4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
|
|
|
|
substituteInPlace $f \
|
2020-05-03 17:38:23 +00:00
|
|
|
--replace "= gcc" "=cc" \
|
2020-05-29 06:06:01 +00:00
|
|
|
--replace "= g++" "=c++" \
|
|
|
|
--replace "-DGNU_RUNTIME=1" "" \
|
|
|
|
--replace "-fgnu-runtime" "-fobjc-nonfragile-abi"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
# we need to build inside this directory as well, so we have to make it writeable
|
|
|
|
chmod +w ../UniversalDetector -R
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildInputs = [ gnustep.base bzip2 icu openssl wavpack zlib ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gnustep.make installShellFiles ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makefile = "Makefile.linux";
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
sourceRoot = "./source/XADMaster";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
install -Dm555 -t $out/bin lsar unar
|
|
|
|
for f in lsar unar; do
|
|
|
|
installManPage ./Extra/$f.?
|
|
|
|
installShellCompletion --bash --name $f ./Extra/$f.bash_completion
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://theunarchiver.com";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An archive unpacker program";
|
|
|
|
longDescription = ''
|
|
|
|
The Unarchiver is an archive unpacker program with support for the popular \
|
|
|
|
zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN, \
|
|
|
|
and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble, \
|
|
|
|
Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH, \
|
|
|
|
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
|
|
|
|
'';
|
2020-05-03 17:38:23 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|