unar: minor cleanups

+22 -24
+22 -24
pkgs/tools/archivers/unar/default.nix
··· 1 1 { stdenv, fetchurl, gnustep, unzip, bzip2, zlib, icu, openssl }: 2 2 3 - stdenv.mkDerivation rec { 4 - name = "${pname}-${version}"; 3 + let 5 4 pname = "unar"; 5 + 6 + in stdenv.mkDerivation rec { 7 + name = "${pname}-${version}"; 6 8 version = "1.10.1"; 7 9 8 10 src = fetchurl { ··· 10 12 sha256 = "0aq9zlar5vzr5qxphws8dm7ax60bsfsw77f4ciwa5dq5lla715j0"; 11 13 }; 12 14 13 - buildInputs = [ 14 - gnustep.make unzip gnustep.base bzip2.dev 15 - zlib.dev icu.dev openssl.dev 16 - ]; 15 + buildInputs = [ gnustep.base bzip2 icu openssl zlib ]; 17 16 18 - postPatch = '' 19 - substituteInPlace Makefile.linux \ 20 - --replace "CC = gcc" "CC=cc" \ 21 - --replace "CXX = g++" "CXX=c++" \ 22 - --replace "OBJCC = gcc" "OBJCC=cc" \ 23 - --replace "OBJCXX = g++" "OBJCXX=c++" 17 + nativeBuildInputs = [ gnustep.make unzip ]; 24 18 25 - substituteInPlace ../UniversalDetector/Makefile.linux \ 26 - --replace "CC = gcc" "CC=cc" \ 27 - --replace "CXX = g++" "CXX=c++" \ 28 - --replace "OBJCC = gcc" "OBJCC=c" \ 29 - --replace "OBJCXX = g++" "OBJCXX=c++" 19 + enableParallelBuilding = true; 20 + 21 + postPatch = '' 22 + for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do 23 + substituteInPlace $f \ 24 + --replace "CC = gcc" "CC=cc" \ 25 + --replace "CXX = g++" "CXX=c++" \ 26 + --replace "OBJCC = gcc" "OBJCC=cc" \ 27 + --replace "OBJCXX = g++" "OBJCXX=c++" 28 + done 30 29 ''; 31 30 32 31 makefile = "Makefile.linux"; ··· 34 33 sourceRoot = "./The Unarchiver/XADMaster"; 35 34 36 35 installPhase = '' 37 - mkdir -p $out/bin 38 - cp lsar $out/bin 39 - cp unar $out/bin 36 + runHook preInstall 40 37 41 - mkdir -p $out/share/man/man1 42 - cp ../Extra/lsar.1 $out/share/man/man1 43 - cp ../Extra/unar.1 $out/share/man/man1 38 + install -Dm755 -t $out/bin lsar unar 39 + install -Dm644 -t $out/share/man/man1 ../Extra/{lsar,unar}.1 44 40 45 41 mkdir -p $out/etc/bash_completion.d 46 42 cp ../Extra/lsar.bash_completion $out/etc/bash_completion.d/lsar 47 43 cp ../Extra/unar.bash_completion $out/etc/bash_completion.d/unar 44 + 45 + runHook postInstall 48 46 ''; 49 47 50 48 meta = with stdenv.lib; { ··· 55 53 zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN, \ 56 54 and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble, \ 57 55 Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH, \ 58 - ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats. 56 + ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats. 59 57 ''; 60 58 license = with licenses; [ lgpl21Plus ]; 61 59 platforms = with platforms; linux;