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