blob: 00539e126ba5c62126bdcecd90186a9b53e4e48f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
stdenv,
fetchFromGitHub,
which,
zstd,
pbzip2,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "makeself";
version = "2.7.1";
src = fetchFromGitHub {
owner = "megastep";
repo = "makeself";
tag = "release-${version}";
fetchSubmodules = true;
hash = "sha256-X35vdzsfAQWAHMvlQSxCeu7IgUNVvnOQaakS27SXlFA=";
};
nativeBuildInputs = [ installShellFiles ];
postPatch = "patchShebangs test";
# 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;
checkTarget = "test";
nativeCheckInputs = [
which
zstd
pbzip2
];
sharePath = "$out/share/${pname}";
installPhase = ''
runHook preInstall
installManPage makeself.1
install -Dm555 makeself.sh $out/bin/makeself
install -Dm444 -t ${sharePath}/ README.md makeself-header.sh
runHook postInstall
'';
fixupPhase = ''
sed -e "s|^HEADER=.*|HEADER=${sharePath}/makeself-header.sh|" -i $out/bin/makeself
'';
meta = {
homepage = "https://makeself.io";
description = "Utility to create self-extracting packages";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.wmertens ];
platforms = lib.platforms.all;
mainProgram = "makeself";
};
}
|