summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-01-18 15:27:39 +0800
committerPeter Hoeg <peter@hoeg.com>2018-04-09 15:14:27 +0800
commit99483fbc4451f0d837bdb9dc0854040ab795865c (patch)
tree7b9f496123478d512e52982063368503103a11c8 /pkgs/tools/archivers
parent0e23e81cc09d25930dfc40fd5bc5269c2e2ec42b (diff)
downloadnixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar.gz
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar.bz2
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar.lz
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar.xz
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.tar.zst
nixpkgs-99483fbc4451f0d837bdb9dc0854040ab795865c.zip
innoextract: support extraction of multi-file archives
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r--pkgs/tools/archivers/innoextract/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/tools/archivers/innoextract/default.nix b/pkgs/tools/archivers/innoextract/default.nix
index 0f6814d53c9..546e9a7aad9 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;
   };
 }