2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which, zstd, pbzip2 }:
|
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
|
|
|
};
|
|
|
|
|
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 = ''
|
|
|
|
mkdir -p $out/{bin,share/{${pname}-${version},man/man1}}
|
|
|
|
cp makeself.lsm README.md $out/share/${pname}-${version}
|
|
|
|
cp makeself.sh $out/bin/makeself
|
|
|
|
cp makeself.1 $out/share/man/man1/
|
|
|
|
cp makeself-header.sh $out/share/${pname}-${version}
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|