Unverified Commit f38d6171 authored by Mutsuha Asada's avatar Mutsuha Asada
Browse files

actionlint: moved to by-name and modernized derivation

- Removed `rec`
- Formatted via nixfmt-rfc-style
- Removed `with lib;`
parent f88d5e23
Loading
Loading
Loading
Loading
+33 −16
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
, python3Packages
, ronn
, shellcheck
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  makeWrapper,
  python3Packages,
  ronn,
  shellcheck,
}:

buildGoModule rec {
  pname = "actionlint";
let
  version = "1.7.1";
in
buildGoModule {
  pname = "actionlint";
  inherit version;

  subPackages = [ "cmd/actionlint" ];

@@ -23,23 +27,36 @@ buildGoModule rec {

  vendorHash = "sha256-ZREtrdHUD1B1Mogidp1y/kFTK+KR4qYJj1c/M+0utPM=";

  nativeBuildInputs = [ makeWrapper ronn installShellFiles ];
  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 ]}
      --prefix PATH : ${
        lib.makeBinPath [
          python3Packages.pyflakes
          shellcheck
        ]
      }
  '';

  ldflags = [ "-s" "-w" "-X github.com/rhysd/actionlint.version=${version}" ];
  ldflags = [
    "-s"
    "-w"
    "-X github.com/rhysd/actionlint.version=${version}"
  ];

  meta = with lib; {
  meta = {
    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 = [ ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ momeemt ];
    mainProgram = "actionlint";
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -16948,8 +16948,6 @@ with pkgs;
  actiona = libsForQt5.callPackage ../applications/misc/actiona { };
  actionlint = callPackage ../development/tools/analysis/actionlint { };
  adreaper = callPackage ../tools/security/adreaper { };
  aeron = callPackage ../servers/aeron { };