1{ lib
2, buildGoModule
3, fetchFromGitHub
4, installShellFiles
5, makeWrapper
6, python3Packages
7, ronn
8, shellcheck
9}:
10
11buildGoModule rec {
12 pname = "actionlint";
13 version = "1.6.24";
14
15 subPackages = [ "cmd/actionlint" ];
16
17 src = fetchFromGitHub {
18 owner = "rhysd";
19 repo = "actionlint";
20 rev = "v${version}";
21 hash = "sha256-aUUHXI3D55bS6RYWNoia4xp80UYR2vz5GUWAdaqjnNk=";
22 };
23
24 vendorHash = "sha256-GtnTzFL6nuUmHAFChIjI6dxzsva/3Ob96DS2iCinlKE=";
25
26 nativeBuildInputs = [ makeWrapper ronn installShellFiles ];
27
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 '';
34
35 ldflags = [ "-s" "-w" "-X github.com/rhysd/actionlint.version=${version}" ];
36
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 };
45}