nixpkgs/pkgs/development/tools/misc/editorconfig-checker/default.nix
2024-04-05 08:28:33 +10:00

39 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, editorconfig-checker }:
buildGoModule rec {
pname = "editorconfig-checker";
version = "3.0.1";
src = fetchFromGitHub {
owner = "editorconfig-checker";
repo = "editorconfig-checker";
rev = "v${version}";
hash = "sha256-jqaYJmezekSKdwg8gNdU/DH6S83dPc5WmTU3nfvKjwo=";
};
vendorHash = "sha256-mPYxBqM4VoSmhtobKAn6p3BXIFGrUzs8gA9x97SmbTw=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-X main.version=${version}" ];
postInstall = ''
installManPage docs/editorconfig-checker.1
'';
passthru.tests.version = testers.testVersion {
package = editorconfig-checker;
};
meta = with lib; {
changelog = "https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/${src.rev}";
description = "A tool to verify that your files are in harmony with your .editorconfig";
mainProgram = "editorconfig-checker";
homepage = "https://editorconfig-checker.github.io/";
license = licenses.mit;
maintainers = with maintainers; [ uri-canva zowoq ];
};
}