evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / bo / bob / package.nix
blobba93433b68626166615a1e39a4c7c86dbe41ed49
1 { lib
2 , stdenv
3 , buildGoModule
4 , fetchFromGitHub
5 , installShellFiles
6 , fetchpatch
7 }:
9 buildGoModule rec {
10   pname = "bob";
11   version = "0.8.2";
13   src = fetchFromGitHub {
14     owner = "benchkram";
15     repo = pname;
16     rev = version;
17     hash = "sha256-zmWfOLBb+GWw9v6LdCC7/WaP1Wz7UipPwqkmI1+rG8Q=";
18   };
20   patches = [
21     # Fix vulnerable dependencies
22     # Backport of https://github.com/benchkram/bob/pull/387
23     (fetchpatch {
24       url = "https://github.com/benchkram/bob/commit/5020e6fafbfbcb1b3add5d936886423ce882793d.patch";
25       hash = "sha256-if1ZErI0Un7d26eOkYSkEa87+VTRcEtF6JbsJYOHpHE=";
26     })
27   ];
29   ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
31   vendorHash = "sha256-u0nFaTQWU9O7A/RAhGaLcBka+YNGjSlpycDF8TLQALw=";
33   excludedPackages = [ "example/server-db" "test/e2e" "tui-example" ];
35   nativeBuildInputs = [ installShellFiles ];
37   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
38     installShellCompletion --cmd bob \
39       --bash <($out/bin/bob completion) \
40       --zsh <($out/bin/bob completion -z)
41   '';
43   # tests require network access
44   doCheck = false;
46   meta = with lib; {
47     description = "Build system for microservices";
48     mainProgram = "bob";
49     homepage = "https://bob.build";
50     license = licenses.asl20;
51     maintainers = with maintainers; [ zuzuleinen ];
52   };