summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ul/ulid/package.nix
blob: 7175df47e525d57393482278a45e13b41e1dba40 (plain)
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
37
38
39
40
41
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  nix-update-script,
}:

buildGoModule (finalAttrs: {
  pname = "ulid";
  version = "2.1.2";

  src = fetchFromGitHub {
    owner = "oklog";
    repo = "ulid";
    tag = "v${finalAttrs.version}";
    hash = "sha256-J4+O+1pQPAr+ieHBocT/AQ9kjmcU40RqRKMrS4qQxfc=";
  };

  vendorHash = "sha256-s1YkEwFxE1zpUUCgwOAl8i6/9HB2rcGG+4kqnixTit0=";

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

  checkFlags = [
    # skip flaky test
    "-skip=TestMonotonicSafe"
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Universally Unique Lexicographically Sortable Identifier (ULID) in Go";
    homepage = "https://github.com/oklog/ulid";
    changelog = "https://github.com/oklog/ulid/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ defelo ];
    mainProgram = "ulid";
  };
})