diff options
author | Nikolay Amiantov <ab@fmap.me> | 2018-04-11 16:46:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 16:46:28 +0300 |
commit | 2483a0d0c192cb301f6d0c816fa596c668b645e4 (patch) | |
tree | b4ecd5fa2690b0ea3dc076e59be5c10da08884dc /pkgs | |
parent | 78d5690ddc23e7a98f32b8554d279156e2e2ecd0 (diff) | |
parent | 99483fbc4451f0d837bdb9dc0854040ab795865c (diff) | |
download | nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar.gz nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar.bz2 nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar.lz nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar.xz nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.tar.zst nixlib-2483a0d0c192cb301f6d0c816fa596c668b645e4.zip |
Merge pull request #33999 from peterhoeg/f/inno
innoextract: support extraction of multi-file archives
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/archivers/innoextract/default.nix | 19 | ||||
-rw-r--r-- | pkgs/tools/archivers/unar/default.nix | 46 |
2 files changed, 37 insertions, 28 deletions
diff --git a/pkgs/tools/archivers/innoextract/default.nix b/pkgs/tools/archivers/innoextract/default.nix index 0f6814d53c99..546e9a7aad98 100644 --- a/pkgs/tools/archivers/innoextract/default.nix +++ b/pkgs/tools/archivers/innoextract/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl, cmake, python, doxygen, lzma, boost}: +{ stdenv, fetchurl, cmake, doxygen, makeWrapper, python +, boost, lzma +, withGog ? false, unar ? null }: stdenv.mkDerivation rec { name = "innoextract-1.6"; @@ -8,14 +10,23 @@ stdenv.mkDerivation rec { sha256 = "0gh3q643l8qlwla030cmf3qdcdr85ixjygkb7j4dbm7zbwa3yik6"; }; - buildInputs = [ python doxygen lzma boost ]; - nativeBuildInputs = [ cmake ]; + buildInputs = [ python lzma boost ]; + + nativeBuildInputs = [ cmake makeWrapper ]; + + enableParallelBuilding = true; + + # we need unar to for multi-archive extraction + postFixup = stdenv.lib.optionalString withGog '' + wrapProgram $out/bin/innoextract \ + --prefix PATH : ${stdenv.lib.makeBinPath [ unar ]} + ''; meta = with stdenv.lib; { description = "A tool to unpack installers created by Inno Setup"; homepage = http://constexpr.org/innoextract/; - platforms = platforms.linux; license = licenses.zlib; maintainers = with maintainers; [ abbradar ]; + platforms = platforms.linux; }; } diff --git a/pkgs/tools/archivers/unar/default.nix b/pkgs/tools/archivers/unar/default.nix index 520742a1b3c7..1104548f77f8 100644 --- a/pkgs/tools/archivers/unar/default.nix +++ b/pkgs/tools/archivers/unar/default.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl, gnustep, unzip, bzip2, zlib, icu, openssl }: -stdenv.mkDerivation rec { - name = "${pname}-${version}"; +let pname = "unar"; + +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; version = "1.10.1"; src = fetchurl { @@ -10,23 +12,20 @@ stdenv.mkDerivation rec { sha256 = "0aq9zlar5vzr5qxphws8dm7ax60bsfsw77f4ciwa5dq5lla715j0"; }; - buildInputs = [ - gnustep.make unzip gnustep.base bzip2.dev - zlib.dev icu.dev openssl.dev - ]; + buildInputs = [ gnustep.base bzip2 icu openssl zlib ]; + + nativeBuildInputs = [ gnustep.make unzip ]; + + enableParallelBuilding = true; postPatch = '' - substituteInPlace Makefile.linux \ - --replace "CC = gcc" "CC=cc" \ - --replace "CXX = g++" "CXX=c++" \ - --replace "OBJCC = gcc" "OBJCC=cc" \ - --replace "OBJCXX = g++" "OBJCXX=c++" - - substituteInPlace ../UniversalDetector/Makefile.linux \ - --replace "CC = gcc" "CC=cc" \ - --replace "CXX = g++" "CXX=c++" \ - --replace "OBJCC = gcc" "OBJCC=c" \ - --replace "OBJCXX = g++" "OBJCXX=c++" + 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 ''; makefile = "Makefile.linux"; @@ -34,17 +33,16 @@ stdenv.mkDerivation rec { sourceRoot = "./The Unarchiver/XADMaster"; installPhase = '' - mkdir -p $out/bin - cp lsar $out/bin - cp unar $out/bin + runHook preInstall - mkdir -p $out/share/man/man1 - cp ../Extra/lsar.1 $out/share/man/man1 - cp ../Extra/unar.1 $out/share/man/man1 + install -Dm755 -t $out/bin lsar unar + install -Dm644 -t $out/share/man/man1 ../Extra/{lsar,unar}.1 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 + + runHook postInstall ''; meta = with stdenv.lib; { @@ -55,7 +53,7 @@ stdenv.mkDerivation rec { 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. + ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats. ''; license = with licenses; [ lgpl21Plus ]; platforms = with platforms; linux; |