summaryrefslogtreecommitdiff
path: root/pkgs/servers/sql/postgresql/ext/ip4r.nix
blob: a893811a4567d594a3437de9e425eeb86fa381df (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
{
  fetchFromGitHub,
  lib,
  postgresql,
  postgresqlBuildExtension,
  postgresqlTestExtension,
}:

postgresqlBuildExtension (finalAttrs: {
  pname = "ip4r";
  version = "2.4.2";

  src = fetchFromGitHub {
    owner = "RhodiumToad";
    repo = "ip4r";
    tag = finalAttrs.version;
    hash = "sha256-3chAD4f4A6VlXVSI0kfC/ANcnFy4vBp4FZpT6QRAueQ=";
  };

  passthru.tests = {
    extension = postgresqlTestExtension {
      inherit (finalAttrs) finalPackage;
      sql = "CREATE EXTENSION ip4r;";
    };
  };

  meta = {
    description = "IPv4/v6 and IPv4/v6 range index type for PostgreSQL";
    homepage = "https://github.com/RhodiumToad/ip4r";
    license = lib.licenses.postgresql;
    maintainers = with lib.maintainers; [ lukegb ];
    inherit (postgresql.meta) platforms;
  };
})