blob: 98559d1ca4b4a55c9db9ad966c1db48cd3812b51 (
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
|
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
, fetchpatch
}:
buildGoModule rec {
pname = "bob";
version = "0.8.2";
src = fetchFromGitHub {
owner = "benchkram";
repo = pname;
rev = version;
hash = "sha256-zmWfOLBb+GWw9v6LdCC7/WaP1Wz7UipPwqkmI1+rG8Q=";
};
patches = [
# Fix vulnerable dependencies
# Backport of https://github.com/benchkram/bob/pull/387
(fetchpatch {
url = "https://github.com/benchkram/bob/commit/5020e6fafbfbcb1b3add5d936886423ce882793d.patch";
hash = "sha256-if1ZErI0Un7d26eOkYSkEa87+VTRcEtF6JbsJYOHpHE=";
})
];
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
vendorHash = "sha256-u0nFaTQWU9O7A/RAhGaLcBka+YNGjSlpycDF8TLQALw=";
excludedPackages = [ "example/server-db" "test/e2e" "tui-example" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd bob \
--bash <($out/bin/bob completion) \
--zsh <($out/bin/bob completion -z)
'';
# tests require network access
doCheck = false;
meta = with lib; {
description = "A build system for microservices";
mainProgram = "bob";
homepage = "https://bob.build";
license = licenses.asl20;
maintainers = with maintainers; [ zuzuleinen ];
};
}
|