lol
1{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "bob";
5 version = "0.8.2";
6
7 src = fetchFromGitHub {
8 owner = "benchkram";
9 repo = pname;
10 rev = version;
11 hash = "sha256-zmWfOLBb+GWw9v6LdCC7/WaP1Wz7UipPwqkmI1+rG8Q=";
12 };
13
14 ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
15
16 vendorHash = "sha256-S1XUgjdSVTWXehOLCxXcvj0SH12cxqvYadVlCw/saF4=";
17
18 excludedPackages = [ "example/server-db" "test/e2e" "tui-example" ];
19
20 nativeBuildInputs = [ installShellFiles ];
21
22 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
23 installShellCompletion --cmd bob \
24 --bash <($out/bin/bob completion) \
25 --zsh <($out/bin/bob completion -z)
26 '';
27
28 # tests require network access
29 doCheck = false;
30
31 meta = with lib; {
32 description = "A build system for microservices";
33 homepage = "https://bob.build";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ zuzuleinen ];
36 };
37}