nix/pkgs/baserow: add public key to baserow_premium

This commit is contained in:
Luke Granger-Brown 2021-12-21 22:12:33 +00:00
parent 969554f9cc
commit a72cc6dd19

View file

@ -42,11 +42,16 @@ let
oss = import ./backend/pynixify/overlay.nix self super;
premium = import ./premium-backend/pynixify/overlay.nix self super;
baserow-premium-backend = premium.baserow-premium-backend.overridePythonAttrs (_: {
inherit version;
src = "${src}/premium/backend";
postInstall = ''
install -m0644 $src/src/baserow_premium/public_key.pem $out/${python.sitePackages}/baserow_premium/public_key.pem
'';
});
in
oss // (if !ossOnly then premium else {}) // {
baserow-backend = oss.baserow-backend.overridePythonAttrs (oldAttrs: {
inherit version;
src = "${src}/backend";
prePatch = ''
# Yeet. Just assume everything is installed in the environment already.
@ -58,7 +63,7 @@ let
};
in
{
inherit src web-frontend-deps mjml-tcpserver-deps;
inherit src web-frontend-deps mjml-tcpserver-deps python;
web-frontend = stdenv.mkDerivation {
name = "baserow${suffix}-web-frontend";
@ -122,7 +127,6 @@ in
install -m 0755 ${./backend/gunicorn.py} $out/bin/baserow-gunicorn
install -m 0755 ${./backend/celery.py} $out/bin/baserow-celery
'';
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ (with python.pkgs; lib.optional (!ossOnly) baserow-premium-backend);
});
mjml-tcpserver = stdenv.mkDerivation {