Skip to content

Commit

Permalink
go-blueprint: init at 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tobifroe committed Nov 1, 2024
1 parent 1593b76 commit 26e4a51
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pkgs/by-name/go/go-blueprint/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
stdenv,
}:

buildGoModule rec {
pname = "go-blueprint";
version = "0.8.1";

src = fetchFromGitHub {
owner = "Melkeydev";
repo = "go-blueprint";
rev = "v${version}";
hash = "sha256-lIx95DY8UpxTW5Zra0APseuXdknsdZAohiGFdwkHE4s=";
};

ldflags = [
"-s -w -X github.com/melkeydev/go-blueprint/cmd.GoBlueprintVersion=v${version}"
];

vendorHash = "sha256-WBzToupC1/O70OYHbKk7S73OEe7XRLAAbY5NoLL7xvw=";

nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "version";

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd go-blueprint \
--bash <($out/bin/go-blueprint completion bash) \
--fish <($out/bin/go-blueprint completion fish) \
--zsh <($out/bin/go-blueprint completion zsh)
'';

meta = {
description = "Initialize Go projects using popular frameworks";
homepage = "https://github.com/Melkeydev/go-blueprint";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tobifroe ];
mainProgram = "go-blueprint";
};
}

0 comments on commit 26e4a51

Please sign in to comment.