1{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater }:
2
3stdenv.mkDerivation {
4 pname = "pgjwt";
5 version = "unstable-2023-03-02";
6
7 src = fetchFromGitHub {
8 owner = "michelp";
9 repo = "pgjwt";
10 rev = "f3d82fd30151e754e19ce5d6a06c71c20689ce3d";
11 sha256 = "sha256-nDZEDf5+sFc1HDcG2eBNQj+kGcdAYRXJseKi9oww+JU=";
12 };
13
14 dontBuild = true;
15 installPhase = ''
16 mkdir -p $out/share/postgresql/extension
17 cp pg*sql *.control $out/share/postgresql/extension
18 '';
19
20 passthru.updateScript = unstableGitUpdater { };
21
22 meta = with lib; {
23 description = "PostgreSQL implementation of JSON Web Tokens";
24 longDescription = ''
25 sign() and verify() functions to create and verify JSON Web Tokens.
26 '';
27 license = licenses.mit;
28 platforms = postgresql.meta.platforms;
29 maintainers = with maintainers; [spinus];
30 };
31}