@@ -0,0 +1,54 @@
1+{ lib
2+, stdenv
3+, fetchFromGitLab
4+, pkg-config
5+, openssl
6+, zlib
7+, busybox
8+}:
9+
10+stdenv.mkDerivation rec {
11+ pname = "abuild";
12+ version = "3.7.0";
13+
14+ src = fetchFromGitLab {
15+ domain = "gitlab.alpinelinux.org";
16+ owner = "alpine";
17+ repo = pname;
18+ rev = "v${version}";
19+ sha256 = "1xsik9hyzzq861bi922sb5r8c6r4wpnpxz5kd30i9f20vvfpp5jx";
20+ };
21+
22+ buildInputs = [
23+ openssl
24+ zlib
25+ busybox
26+ ];
27+
28+ nativeBuildInputs = [
29+ pkg-config
30+ ];
31+
32+ patchPhase = ''
33+ substituteInPlace ./Makefile \
34+ --replace 'chmod 4555' '#chmod 4555'
35+ '';
36+
37+ makeFlags = [
38+ "prefix=${placeholder "out"}"
39+ "CFLAGS=-Wno-error"
40+ ];
41+
42+ installFlags = [
43+ "sysconfdir=${placeholder "out"}/etc"
44+ ];
45+
46+ meta = with lib; {
47+ description = "Alpine Linux build tools";
48+ homepage = "https://gitlab.alpinelinux.org/alpine/abuild";
49+ license = licenses.gpl2Plus;
50+ maintainers = with maintainers; [ onny ];
51+ platforms = platforms.unix;
52+ };
53+
54+}