about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ke/keep-sorted/package.nix
blob: 78a9e8522fbc50fb75a1f7c688d625eb66c8e1ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "keep-sorted";
  version = "0.3.0";

  src = fetchFromGitHub {
    owner = "google";
    repo = "keep-sorted";
    rev = "v${version}";
    hash = "sha256-qCR1JVDC/+NVz+CAY/2mMP8Sk71WDl2+Ig7QWwXTUrQ=";
  };

  vendorHash = "sha256-tPTWWvr+/8wWUnQcI4Ycco2OEgA2mDQt15OGCk/ZjrQ=";

  CGO_ENABLED = "0";

  ldfags = [ "-s" "-w" ];

  checkFlags = [
    # Test tries to find files using git
    "-skip=^TestGoldens"
  ];

  meta = {
    changelog = "https://github.com/google/keep-sorted/releases/tag/v${version}";
    description = "Language-agnostic formatter that sorts lines between two markers in a larger file";
    homepage = "https://github.com/google/keep-sorted";
    license = lib.licenses.asl20;
    mainProgram = "keep-sorted";
    maintainers = with lib.maintainers; [ katexochen ];
  };
}