about summary refs log tree commit diff
path: root/pkgs/development/tools/abuild/default.nix
blob: 144ec8be9d4e61176b47340dfae0bb5f4242d856 (plain) (blame)
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
{ lib
, stdenv
, fetchFromGitLab
, pkg-config
, openssl
, zlib
, busybox
}:

stdenv.mkDerivation rec {
  pname = "abuild";
  version = "3.7.0";

  src = fetchFromGitLab {
    domain = "gitlab.alpinelinux.org";
    owner = "alpine";
    repo = pname;
    rev = "v${version}";
    sha256 = "1xsik9hyzzq861bi922sb5r8c6r4wpnpxz5kd30i9f20vvfpp5jx";
  };

  buildInputs = [
    openssl
    zlib
    busybox
  ];

  nativeBuildInputs = [
    pkg-config
  ];

  patchPhase = ''
    substituteInPlace ./Makefile \
      --replace 'chmod 4555' '#chmod 4555'
  '';

  makeFlags = [
    "prefix=${placeholder "out"}"
    "CFLAGS=-Wno-error"
  ];

  installFlags = [
    "sysconfdir=${placeholder "out"}/etc"
  ];

  meta = with lib; {
    description = "Alpine Linux build tools";
    homepage = "https://gitlab.alpinelinux.org/alpine/abuild";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ onny ];
    platforms = platforms.unix;
  };

}