Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / analysis / actionlint / default.nix
blobb953aea0bb2d57dcba2e0a14fe62769dfebcaf54
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 , makeWrapper
6 , python3Packages
7 , ronn
8 , shellcheck
9 }:
11 buildGoModule rec {
12   pname = "actionlint";
13   version = "1.6.26";
15   subPackages = [ "cmd/actionlint" ];
17   src = fetchFromGitHub {
18     owner = "rhysd";
19     repo = "actionlint";
20     rev = "v${version}";
21     hash = "sha256-BCja8twbPwYI41JuQs2LHMCXlTbY5FAjHhZvn5mIlkg=";
22   };
24   vendorHash = "sha256-sBwI2L9tNg8Q/vIhhp0eIxetklytvJj+O1mWjrHkH24=";
26   nativeBuildInputs = [ makeWrapper ronn installShellFiles ];
28   postInstall = ''
29     ronn --roff man/actionlint.1.ronn
30     installManPage man/actionlint.1
31     wrapProgram "$out/bin/actionlint" \
32       --prefix PATH : ${lib.makeBinPath [ python3Packages.pyflakes shellcheck ]}
33   '';
35   ldflags = [ "-s" "-w" "-X github.com/rhysd/actionlint.version=${version}" ];
37   meta = with lib; {
38     homepage = "https://rhysd.github.io/actionlint/";
39     description = "Static checker for GitHub Actions workflow files";
40     changelog = "https://github.com/rhysd/actionlint/raw/v${version}/CHANGELOG.md";
41     license = licenses.mit;
42     maintainers = [ maintainers.marsam ];
43     mainProgram = "actionlint";
44   };