blob: f54db3d2a7f83a96959949f9c098c3059886d6fb (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
package toybox-source {
description = "toybox source tree";
exclude = true;
version# = "0.8.14";
output = remoteTar {
url = "https://landley.net/toybox/downloads/toybox-"+version+".tar.gz";
checksum = "RZQp2CTsLt_y15vsZxwqUb2O1XfK7uvwn-2sTd38O4HAsFKPQpS1UP0brYJ3dRA-";
compress = gzip;
};
}
package toybox {
description = "many common Linux command line utilities";
website = "https://landley.net/toybox";
anitya = 13818;
source = toybox-source;
writable = true;
enterSource = true;
toyboxEarly = true;
exec = make {
defaults = false;
chdir = false;
configure = nil;
preMake = `
LDFLAGS="${LDFLAGS:-''} -static"
chmod +w /bin/
ln -rs "$(which bash)" /bin/ || true
chmod +w kconfig tests
rm \
tests/du.test \
tests/sed.test \
tests/tar.test \
tests/ls.test \
tests/taskset.test
make defconfig
sed -i \
's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
.config
`;
check = [
"USER=cure",
"tests",
];
checkEarly = false;
install = "PREFIX=/work/system/bin make install_flat";
postInstall = `
mkdir -p /work/usr/bin
ln -s ../../system/bin/env /work/usr/bin
`;
};
inputs = [
bash,
gzip,
kernel-headers,
];
}
package toybox-early {
description = "a build of toybox with unfinished tools enabled to break dependency loops";
website = "https://landley.net/toybox";
exclude = true;
source = toybox-source;
writable = true;
enterSource = true;
toyboxEarly = true;
exec = make {
defaults = false;
chdir = false;
configure = nil;
preMake = `
LDFLAGS="${LDFLAGS:-''} -static"
chmod +w /bin/
ln -rs "$(which bash)" /bin/ || true
chmod +w kconfig tests
rm \
tests/du.test \
tests/sed.test \
tests/tar.test \
tests/ls.test \
tests/taskset.test
make defconfig
sed -i \
's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
.config
echo '
CONFIG_EXPR=y
CONFIG_TR=y
CONFIG_AWK=y
CONFIG_DIFF=y
' >> .config
`;
check = [
"USER=cure",
"tests",
];
checkEarly = false;
install = "PREFIX=/work/system/bin make install_flat";
postInstall = `
mkdir -p /work/usr/bin
ln -s ../../system/bin/env /work/usr/bin
`;
};
inputs = [
bash,
gzip,
kernel-headers,
];
}
|