nixpkgs/pkgs/development/tools/go-task/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
Nix
Raw Normal View History

2023-05-28 00:21:15 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, go-task
}:
2020-07-23 00:48:48 +00:00
buildGoModule rec {
pname = "go-task";
2023-12-28 17:27:00 +00:00
version = "3.33.1";
2020-07-23 00:48:48 +00:00
src = fetchFromGitHub {
owner = pname;
repo = "task";
2023-03-14 08:19:41 +00:00
rev = "refs/tags/v${version}";
2023-12-28 17:27:00 +00:00
hash = "sha256-GeAVI1jsYH66KIJsdC20j3HADl6y8gRezSWBUEF1Muw=";
2020-07-23 00:48:48 +00:00
};
2023-12-28 17:27:00 +00:00
vendorHash = "sha256-kKYE8O+07ha35koSO+KG/K98rVbmDLqAhvaZsVHwUjY=";
2020-07-23 00:48:48 +00:00
doCheck = false;
2021-12-22 04:56:27 +00:00
nativeBuildInputs = [ installShellFiles ];
2020-07-23 00:48:48 +00:00
subPackages = [ "cmd/task" ];
2021-08-26 06:45:51 +00:00
ldflags = [
2023-05-28 00:20:40 +00:00
"-s"
"-w"
"-X=github.com/go-task/task/v3/internal/version.version=${version}"
2020-07-23 00:48:48 +00:00
];
postInstall = ''
ln -s $out/bin/task $out/bin/go-task
2021-12-22 04:56:27 +00:00
installShellCompletion completion/{bash,fish,zsh}/*
2020-07-23 00:48:48 +00:00
'';
2023-05-28 00:21:15 +00:00
passthru.tests = {
version = testers.testVersion {
package = go-task;
};
};
2020-07-23 00:48:48 +00:00
meta = with lib; {
homepage = "https://taskfile.dev/";
description = "A task runner / simpler Make alternative written in Go";
2023-03-14 08:19:41 +00:00
changelog = "https://github.com/go-task/task/blob/v${version}/CHANGELOG.md";
2020-07-23 00:48:48 +00:00
license = licenses.mit;
maintainers = with maintainers; [ parasrah ];
};
}