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

62 lines
1.8 KiB
Nix
Raw Normal View History

2016-08-19 11:44:19 +00:00
{ stdenv, fetchurl, gnustep, unzip, bzip2, zlib, icu, openssl }:
2018-01-18 07:26:15 +00:00
let
2016-08-19 11:44:19 +00:00
pname = "unar";
2018-01-18 07:26:15 +00:00
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
2016-08-19 11:44:19 +00:00
version = "1.10.1";
src = fetchurl {
url = "http://unarchiver.c3.cx/downloads/${pname}${version}_src.zip";
sha256 = "0aq9zlar5vzr5qxphws8dm7ax60bsfsw77f4ciwa5dq5lla715j0";
};
2018-01-18 07:26:15 +00:00
buildInputs = [ gnustep.base bzip2 icu openssl zlib ];
nativeBuildInputs = [ gnustep.make unzip ];
enableParallelBuilding = true;
2016-08-19 11:44:19 +00:00
postPatch = ''
2018-01-18 07:26:15 +00:00
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
substituteInPlace $f \
--replace "CC = gcc" "CC=cc" \
--replace "CXX = g++" "CXX=c++" \
--replace "OBJCC = gcc" "OBJCC=cc" \
--replace "OBJCXX = g++" "OBJCXX=c++"
done
2016-08-19 11:44:19 +00:00
'';
makefile = "Makefile.linux";
sourceRoot = "./The Unarchiver/XADMaster";
installPhase = ''
2018-01-18 07:26:15 +00:00
runHook preInstall
2016-08-19 11:44:19 +00:00
2018-01-18 07:26:15 +00:00
install -Dm755 -t $out/bin lsar unar
install -Dm644 -t $out/share/man/man1 ../Extra/{lsar,unar}.1
2016-08-19 11:44:19 +00:00
mkdir -p $out/etc/bash_completion.d
cp ../Extra/lsar.bash_completion $out/etc/bash_completion.d/lsar
cp ../Extra/unar.bash_completion $out/etc/bash_completion.d/unar
2018-01-18 07:26:15 +00:00
runHook postInstall
2016-08-19 11:44:19 +00:00
'';
meta = with stdenv.lib; {
homepage = http://unarchiver.c3.cx/unarchiver;
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, \
2018-01-18 07:26:15 +00:00
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
2016-08-19 11:44:19 +00:00
'';
license = with licenses; [ lgpl21Plus ];
platforms = with platforms; linux;
};
}