depot/third_party/nixpkgs/pkgs/development/tools/analysis/actionlint/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

45 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
, python3Packages
, ronn
, shellcheck
}:
buildGoModule rec {
pname = "actionlint";
version = "1.6.13";
subPackages = [ "cmd/actionlint" ];
src = fetchFromGitHub {
owner = "rhysd";
repo = "actionlint";
rev = "v${version}";
sha256 = "sha256-EZqWamNfv4+f1Ajm6StEdDLOwwWdJr1mrzd3+ba3YHI=";
};
vendorSha256 = "sha256-fADaYrGtg4B7XqD2MUMw30xfGT70Hx+iue79AIDsSRc=";
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";
};
}