summary refs log tree commit diff
path: root/pkgs/applications/misc/acbuild/default.nix
blob: 319764ae81a5d5d1f51276b93671fcee94929177 (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
{ stdenv, lib, go, fetchFromGitHub }:

stdenv.mkDerivation rec {
  name = "acbuild-${version}";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "appc";
    repo = "acbuild";
    rev = "v${version}";
    sha256 = "0s81xlaw75d05b4cidxml978hnxak8parwpnk9clanwqjbj66c7x";
  };

  buildInputs = [ go ];

  patchPhase = ''
    sed -i -e 's|\git describe --dirty|echo "${version}"|' build
  '';

  buildPhase = ''
    patchShebangs build
    ./build
  '';

  installPhase = ''
    mkdir -p $out
    mv bin $out
  '';

  meta = with stdenv.lib; {
    description = "A build tool for ACIs";
    homepage = https://github.com/appc/acbuild;
    license = licenses.asl20;
    maintainers = with maintainers; [ dgonyeo ];
    platforms = platforms.linux;
  };
}