nixpkgs/pkgs/development/tools/go-task/default.nix
2022-12-08 19:22:29 +00:00

38 lines
869 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "go-task";
version = "3.19.0";
src = fetchFromGitHub {
owner = pname;
repo = "task";
rev = "v${version}";
sha256 = "sha256-UsMUBdhoWl2e4i3m7Tu4R3qULRf85V4Uw/52xMMyWio=";
};
vendorSha256 = "sha256-+DmnYd415FWgbY+gkDVWjnvbjTppfFV5NMpIE3Mm124=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/task" ];
ldflags = [
"-s" "-w" "-X main.version=${version}"
];
postInstall = ''
ln -s $out/bin/task $out/bin/go-task
installShellCompletion completion/{bash,fish,zsh}/*
'';
meta = with lib; {
homepage = "https://taskfile.dev/";
description = "A task runner / simpler Make alternative written in Go";
license = licenses.mit;
maintainers = with maintainers; [ parasrah ];
};
}