1{ stdenv, fetchFromGitHub }:
2stdenv.mkDerivation rec {
3 name = "pgjwt-${version}";
4 version = "0.0.1";
5 src = fetchFromGitHub {
6 owner = "michelp";
7 repo = "pgjwt";
8 rev = "12a41eef15e6d3a22399e03178560d5174d496a3";
9 sha256 = "1dgx7kqkf9d7j5qj3xykx238xm8jg0s6c8h7zyl4lx8dmbz9sgsv";
10 };
11 dontBuild = true;
12 installPhase = ''
13 mkdir -p $out/bin # current postgresql extension mechanism in nixos requires bin directory
14 mkdir -p $out/share/extension
15 cp pg*sql *.control $out/share/extension
16 '';
17 meta = with stdenv.lib; {
18 description = "PostgreSQL implementation of JSON Web Tokens";
19 longDescription = ''
20 sign() and verify() functions to create and verify JSON Web Tokens.
21 '';
22 license = licenses.mit;
23 maintainers = with maintainers; [spinus];
24 };
25}