From a72cc6dd196e4b51cb6b5e5921e885dc9254937d Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 21 Dec 2021 22:12:33 +0000 Subject: [PATCH] nix/pkgs/baserow: add public key to baserow_premium --- nix/pkgs/baserow/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nix/pkgs/baserow/default.nix b/nix/pkgs/baserow/default.nix index f95ee30244..698de3d812 100644 --- a/nix/pkgs/baserow/default.nix +++ b/nix/pkgs/baserow/default.nix @@ -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 {