fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / go / go-blueprint / package.nix
blobfe478ddb999b75ba948387983c864aea2054e9c3
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6   versionCheckHook,
7   stdenv,
8 }:
10 buildGoModule rec {
11   pname = "go-blueprint";
12   version = "0.10.1";
14   src = fetchFromGitHub {
15     owner = "Melkeydev";
16     repo = "go-blueprint";
17     rev = "v${version}";
18     hash = "sha256-wNS8Tv0LzAPK9F98Rm2fS+fOoZXiJYYq97wYy9KzQ0g=";
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   };