depot/third_party/nixpkgs/pkgs/development/tools/go-task/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

53 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, go-task
}:
buildGoModule rec {
pname = "go-task";
version = "3.32.0";
src = fetchFromGitHub {
owner = pname;
repo = "task";
rev = "refs/tags/v${version}";
hash = "sha256-ngBYnPwZ+B5BB2avnR2J6+8mNxT9vxtI8f9agNtD8uw=";
};
vendorHash = "sha256-mPQ7sSFLzvcWtNh3pFhHKpnu5gXK+wC5qbGMRLZFTBE=";
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 ];
};
}