about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/wire/default.nix
blob: 601c7fa8df7cc52d9b47e69f1c3ed279d3f3a779 (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
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "wire";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "google";
    repo = "wire";
    rev = "v${version}";
    hash = "sha256-bV/bb577JzGF37HmvRprxr+GWcLLiFRisURwtGDbqko=";
  };

  patches = [
    # Bump the minimum version of Go required to compile packages in this module,
    # as `golang.org/x/tools` requires go1.18 or later.
    ./go-modules.patch
  ];

  vendorHash = "sha256-7IW97ZvCGlKCiVh8mKQutTdAxih7oFkXrKo4h3Pl9YY=";

  subPackages = [ "cmd/wire" ];

  ldflags = [ "-s" "-w" ];

  meta = with lib; {
    homepage = "https://github.com/google/wire";
    description = "A code generation tool that automates connecting components using dependency injection";
    license = licenses.asl20;
    maintainers = with maintainers; [ svrana ];
  };
}