nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6 testers,
7 editorconfig-checker,
8}:
9
10buildGoModule rec {
11 pname = "editorconfig-checker";
12 version = "3.3.0";
13
14 src = fetchFromGitHub {
15 owner = "editorconfig-checker";
16 repo = "editorconfig-checker";
17 rev = "v${version}";
18 hash = "sha256-TRbUehdHzgjc87O8/kZyC9c9ouxJrs/nSN24E5BOrzU=";
19 };
20
21 vendorHash = "sha256-g7SSy55IKxfM1cjyy1n7As278HU+GdNeq1vSSM4B8GM=";
22
23 doCheck = false;
24
25 nativeBuildInputs = [ installShellFiles ];
26
27 ldflags = [ "-X main.version=${version}" ];
28
29 postInstall = ''
30 installManPage docs/editorconfig-checker.1
31 '';
32
33 passthru.tests.version = testers.testVersion {
34 package = editorconfig-checker;
35 };
36
37 meta = with lib; {
38 changelog = "https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/${src.rev}";
39 description = "Tool to verify that your files are in harmony with your .editorconfig";
40 mainProgram = "editorconfig-checker";
41 homepage = "https://editorconfig-checker.github.io/";
42 license = licenses.mit;
43 maintainers = with maintainers; [
44 uri-canva
45 zowoq
46 ];
47 };
48}