1{ lib, stdenv, fetchFromGitHub, postgresql }:
2
3stdenv.mkDerivation {
4 pname = "pgjwt";
5 version = "unstable-2017-04-24";
6
7 src = fetchFromGitHub {
8 owner = "michelp";
9 repo = "pgjwt";
10 rev = "546a2911027b716586e241be7fd4c6f1785237cd";
11 sha256 = "1riz0xvwb6y02j0fljbr9hcbqb2jqs4njlivmavy9ysbcrrv1vrf";
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 meta = with lib; {
21 description = "PostgreSQL implementation of JSON Web Tokens";
22 longDescription = ''
23 sign() and verify() functions to create and verify JSON Web Tokens.
24 '';
25 license = licenses.mit;
26 platforms = postgresql.meta.platforms;
27 maintainers = with maintainers; [spinus];
28 };
29}