depot/third_party/nixpkgs/pkgs/development/tools/analysis/actionlint/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

45 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
, python3Packages
, ronn
, shellcheck
}:
buildGoModule rec {
pname = "actionlint";
version = "1.6.26";
subPackages = [ "cmd/actionlint" ];
src = fetchFromGitHub {
owner = "rhysd";
repo = "actionlint";
rev = "v${version}";
hash = "sha256-BCja8twbPwYI41JuQs2LHMCXlTbY5FAjHhZvn5mIlkg=";
};
vendorHash = "sha256-sBwI2L9tNg8Q/vIhhp0eIxetklytvJj+O1mWjrHkH24=";
nativeBuildInputs = [ makeWrapper ronn installShellFiles ];
postInstall = ''
ronn --roff man/actionlint.1.ronn
installManPage man/actionlint.1
wrapProgram "$out/bin/actionlint" \
--prefix PATH : ${lib.makeBinPath [ python3Packages.pyflakes shellcheck ]}
'';
ldflags = [ "-s" "-w" "-X github.com/rhysd/actionlint.version=${version}" ];
meta = with lib; {
homepage = "https://rhysd.github.io/actionlint/";
description = "Static checker for GitHub Actions workflow files";
changelog = "https://github.com/rhysd/actionlint/raw/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
mainProgram = "actionlint";
};
}