So I have a prosody service which I’d to build with support for postgresql, which seems to require that I add another luarocks package, and I can’t for the life of me figure out how to do it.
On master (I’m running 19.03) I can see that there’s luarocks packages for luadbi which support postgresql, and I’ve tried various ways of stealing that:
{ config, pkgs, lua, luaPackages, ... }:
self: super:
{
luadbi-postgresql = buildLuarocksPackage {
pname = "luadbi-postgresql";
version = "0.7.2-1";
src = fetchurl {
url = https://luarocks.org/luadbi-postgresql-0.7.2-1.src.rock;
sha256 = "0nmm1hdzl77wk8p6r6al6mpkh2n332a8r3iqsdi6v4nxamykdh28";
};
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
propagatedBuildInputs = [ lua luadbi ];
meta = with stdenv.lib; {
homepage = "https://github.com/mwild1/luadbi";
description = "Database abstraction layer";
license = {
fullName = "MIT/X11";
};
};
};
}
and then simply importing it in my system wide configuration. But this failed as buildLuarocksPackage can’t be resolved, and I didn’t go far enough into building lua packages to figure out how to fix it.
What’s a better way of building prosody with a luadbi that supports postgresql?