dockerfmt: init at 0.3.7
This commit is contained in:
parent
94044d4936
commit
ea03f15d3e
42
pkgs/by-name/do/dockerfmt/package.nix
Normal file
42
pkgs/by-name/do/dockerfmt/package.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
installShellFiles,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "dockerfmt";
|
||||
version = "0.3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "reteps";
|
||||
repo = "dockerfmt";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-cNxPe0LOZyUxyw43fmTQeoxvXcT9K+not/3SvChBSx4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-fLGgvAxSAiVSrsnF7r7EpPKCOOD9jzUsXxVQNWjYq80=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd dockerfmt \
|
||||
--bash <($out/bin/dockerfmt completion bash) \
|
||||
--fish <($out/bin/dockerfmt completion fish) \
|
||||
--zsh <($out/bin/dockerfmt completion zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgramArg = "version";
|
||||
|
||||
meta = {
|
||||
description = "Dockerfile formatter: a modern dockfmt";
|
||||
homepage = "https://github.com/reteps/dockerfmt";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ mahyarmirrashed ];
|
||||
mainProgram = "dockerfmt";
|
||||
};
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user