Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / go-task / default.nix
blobf03d51273454aa2258791ded530ed4aa2fdc1046
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 , testers
6 , go-task
7 }:
9 buildGoModule rec {
10   pname = "go-task";
11   version = "3.31.0";
13   src = fetchFromGitHub {
14     owner = pname;
15     repo = "task";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-KkswkTgdhDzPLfbAdyhbo9IyYqxG5se0pt9QVTNZclM=";
18   };
20   vendorHash = "sha256-ha2vJDh1rduoFU4a1Ta1cNWegAGt2VCq8N1emUYUZ64=";
22   doCheck = false;
24   nativeBuildInputs = [ installShellFiles ];
26   subPackages = [ "cmd/task" ];
28   ldflags = [
29     "-s"
30     "-w"
31     "-X=github.com/go-task/task/v3/internal/version.version=${version}"
32   ];
34   postInstall = ''
35     ln -s $out/bin/task $out/bin/go-task
37     installShellCompletion completion/{bash,fish,zsh}/*
38   '';
40   passthru.tests = {
41     version = testers.testVersion {
42       package = go-task;
43     };
44   };
46   meta = with lib; {
47     homepage = "https://taskfile.dev/";
48     description = "A task runner / simpler Make alternative written in Go";
49     changelog = "https://github.com/go-task/task/blob/v${version}/CHANGELOG.md";
50     license = licenses.mit;
51     maintainers = with maintainers; [ parasrah ];
52   };