depot/third_party/nixpkgs/pkgs/tools/archivers/innoextract/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchurl
, cmake
, makeWrapper
, boost
, xz
, libiconv
, withGog ? false
, unar ? null
}:
stdenv.mkDerivation rec {
pname = "innoextract";
version = "1.9";
src = fetchurl {
url = "https://constexpr.org/innoextract/files/innoextract-${version}.tar.gz";
sha256 = "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33";
};
buildInputs = [ xz boost ]
++ lib.optionals stdenv.isDarwin [ libiconv ];
# Python is reported as missing during the build, however
# including Python does not change the output.
nativeBuildInputs = [ cmake makeWrapper ];
strictDeps = true;
# we need unar to for multi-archive extraction
postFixup = lib.optionalString withGog ''
wrapProgram $out/bin/innoextract \
--prefix PATH : ${lib.makeBinPath [ unar ]}
'';
meta = with lib; {
description = "Tool to unpack installers created by Inno Setup";
homepage = "https://constexpr.org/innoextract/";
license = licenses.zlib;
maintainers = with maintainers; [ abbradar ];
platforms = platforms.unix;
mainProgram = "innoextract";
};
}