evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / go / go-blueprint / package.nix
blob54908b491a11e87ee7790fbc54acf28155e63f87
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6   versionCheckHook,
7   stdenv,
8 }:
10 buildGoModule rec {
11   pname = "go-blueprint";
12   version = "0.8.2";
14   src = fetchFromGitHub {
15     owner = "Melkeydev";
16     repo = "go-blueprint";
17     rev = "v${version}";
18     hash = "sha256-4KEshM6y27CD+PiyYoz4IWKkfLWRXOTA7bMFfxVYfaI=";
19   };
21   ldflags = [
22     "-s -w -X github.com/melkeydev/go-blueprint/cmd.GoBlueprintVersion=v${version}"
23   ];
25   vendorHash = "sha256-WBzToupC1/O70OYHbKk7S73OEe7XRLAAbY5NoLL7xvw=";
27   nativeBuildInputs = [ installShellFiles ];
28   nativeInstallCheckInputs = [
29     versionCheckHook
30   ];
31   doInstallCheck = true;
32   versionCheckProgramArg = "version";
34   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
35     installShellCompletion --cmd go-blueprint \
36       --bash <($out/bin/go-blueprint completion bash) \
37       --fish <($out/bin/go-blueprint completion fish) \
38       --zsh <($out/bin/go-blueprint completion zsh)
39   '';
41   meta = {
42     description = "Initialize Go projects using popular frameworks";
43     homepage = "https://github.com/Melkeydev/go-blueprint";
44     license = lib.licenses.mit;
45     maintainers = with lib.maintainers; [ tobifroe ];
46     mainProgram = "go-blueprint";
47   };