2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which, zstd, pbzip2, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "2.4.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "makeself";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "megastep";
|
|
|
|
repo = "makeself";
|
|
|
|
rev = "release-${version}";
|
2020-05-15 21:57:56 +00:00
|
|
|
fetchSubmodules = true;
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-15lUtErGsbXF2Gn0f0rvA18mMuVMmkKrGO2poeYZU9g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
postPatch = "patchShebangs test";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# Issue #110149: our default /bin/sh apparently has 32-bit math only
|
|
|
|
# (attribute busybox-sandbox-shell), and that causes problems
|
|
|
|
# when running these tests inside build, based on free disk space.
|
|
|
|
doCheck = false;
|
2020-05-15 21:57:56 +00:00
|
|
|
checkTarget = "test";
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ which zstd pbzip2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
runHook preInstall
|
|
|
|
installManPage makeself.1
|
|
|
|
install -Dm555 makeself.sh $out/bin/makeself
|
|
|
|
install -Dm444 -t $out/share/${pname}/ makeself.lsm README.md makeself-header.sh
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
fixupPhase = ''
|
|
|
|
sed -e "s|^HEADER=.*|HEADER=$out/share/${pname}-${version}/makeself-header.sh|" -i $out/bin/makeself
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://makeself.io";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Utility to create self-extracting packages";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.wmertens ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|