Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 33 lines 868 B view raw
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "wire"; 5 version = "0.6.0"; 6 7 src = fetchFromGitHub { 8 owner = "google"; 9 repo = "wire"; 10 rev = "v${version}"; 11 hash = "sha256-bV/bb577JzGF37HmvRprxr+GWcLLiFRisURwtGDbqko="; 12 }; 13 14 patches = [ 15 # Bump the minimum version of Go required to compile packages in this module, 16 # as `golang.org/x/tools` requires go1.18 or later. 17 ./go-modules.patch 18 ]; 19 20 vendorHash = "sha256-7IW97ZvCGlKCiVh8mKQutTdAxih7oFkXrKo4h3Pl9YY="; 21 22 subPackages = [ "cmd/wire" ]; 23 24 ldflags = [ "-s" "-w" ]; 25 26 meta = with lib; { 27 homepage = "https://github.com/google/wire"; 28 description = "A code generation tool that automates connecting components using dependency injection"; 29 mainProgram = "wire"; 30 license = licenses.asl20; 31 maintainers = with maintainers; [ svrana ]; 32 }; 33}