nixpkgs/pkgs/development/tools/go-task/default.nix
2022-09-10 17:09:14 +08:00

39 lines
869 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "go-task";
version = "3.15.2";
src = fetchFromGitHub {
owner = pname;
repo = "task";
rev = "v${version}";
sha256 = "sha256-UeKb+v9mHKCwQAGzaYQ0aRi7oCZOOIP1dal0ro3iwzI=";
};
vendorSha256 = "sha256-xp1s1aixPyXq9oVD8IZYSlUiL8UkIx5c8gYJRpIRD7I=";
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 ];
};
}