about summary refs log tree commit diff
path: root/tools/gotest/default.nix
blob: 168d15748e1f2503a511b0d47fb7d2b3ee3598ed (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
# This file demonstrates how to make use of pkgs.buildGo.
#
# It introduces libraries and protobuf support, however gRPC support
# is not yet included.
#
# From the root of this repository this example can be built with
# `nix-build -A tools.gotest`
{ pkgs, ... }:

let
  inherit (pkgs) buildGo;

  somelib = buildGo.package {
    name = "somelib";
    srcs = [ ./lib.go ];
  };

  someproto = buildGo.proto {
    name = "someproto";
    proto = ./test.proto;
  };

in buildGo.program {
  name = "gotest";
  srcs = [ ./main.go ];
  deps = [ somelib someproto ];
} // { meta.enableCI = true; }