2024-06-05 15:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, makeWrapper
|
|
|
|
, boost
|
|
|
|
, xz
|
|
|
|
, libiconv
|
|
|
|
, withGog ? false
|
|
|
|
, unar ? null
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "innoextract";
|
|
|
|
version = "1.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "https://constexpr.org/innoextract/files/innoextract-${version}.tar.gz";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ xz boost ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
# Python is reported as missing during the build, however
|
|
|
|
# including Python does not change the output.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# we need unar to for multi-archive extraction
|
2021-01-15 22:18:51 +00:00
|
|
|
postFixup = lib.optionalString withGog ''
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/innoextract \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ unar ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to unpack installers created by Inno Setup";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://constexpr.org/innoextract/";
|
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "innoextract";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|