depot/third_party/nixpkgs/pkgs/development/tools/go-task/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

53 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, go-task
}:
buildGoModule rec {
pname = "go-task";
version = "3.27.1";
src = fetchFromGitHub {
owner = pname;
repo = "task";
rev = "refs/tags/v${version}";
hash = "sha256-MwZtdxoWo5yeJKzbMIfigt0WUjZ52B8MeRsx43D8n1k=";
};
vendorHash = "sha256-05+/NbLks9Dp9Z7KscK9yeEzFJug7VFBqViievX6UOs=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/task" ];
ldflags = [
"-s"
"-w"
"-X=github.com/go-task/task/v3/internal/version.version=${version}"
];
postInstall = ''
ln -s $out/bin/task $out/bin/go-task
installShellCompletion completion/{bash,fish,zsh}/*
'';
passthru.tests = {
version = testers.testVersion {
package = go-task;
};
};
meta = with lib; {
homepage = "https://taskfile.dev/";
description = "A task runner / simpler Make alternative written in Go";
changelog = "https://github.com/go-task/task/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ parasrah ];
};
}