lasuite-docs{,-collaboration-server,-frontend}: 4.8.6 -> 5.0.0 (#516841)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
let
|
||||
inherit (lib)
|
||||
getExe
|
||||
hasAttr
|
||||
mapAttrs
|
||||
match
|
||||
mkEnableOption
|
||||
@@ -362,6 +363,15 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ manage ];
|
||||
|
||||
# Some settings options in LaSuite has been renamed in 5.0.0
|
||||
# Show warnings if those settings are not renamed
|
||||
# TODO: remove it when the retrocompatibility options will be gone
|
||||
warnings =
|
||||
(optional (hasAttr "AI_API_KEY" cfg.settings) "AI_API_KEY has been renamed as OPENAI_SDK_API_KEY in LaSuite Docs")
|
||||
++ (optional (hasAttr "AI_API_KEY_FILE" cfg.settings) "AI_API_KEY_FILE has been renamed as OPENAI_SDK_API_KEY_FILE in LaSuite Docs")
|
||||
++ (optional (hasAttr "AI_BASE_URL" cfg.settings) "AI_BASE_URL has been renamed as OPENAI_SDK_BASE_URL in LaSuite Docs");
|
||||
|
||||
systemd.services.lasuite-docs-postgresql-setup = mkIf cfg.postgresql.createLocally {
|
||||
wantedBy = [ "lasuite-docs.target" ];
|
||||
requiredBy = [ "lasuite-docs.service" ];
|
||||
|
||||
@@ -13,20 +13,20 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lasuite-docs-collaboration-server";
|
||||
version = "4.8.6";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "suitenumerique";
|
||||
repo = "docs";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-8xMHHyj9qUdrd5dFYVlN2bi7EVjcEqoBBxIifC8xk3k=";
|
||||
hash = "sha256-yjcnXC46C2Z453oN4/fJc2q+B0yQKL3jKaIIpRlzu5s=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/src/frontend";
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${finalAttrs.src}/src/frontend/yarn.lock";
|
||||
hash = "sha256-4jaKWepa3+SxEVS+gF5QrOeJaOpS8vzFXZyN9SxClUE=";
|
||||
hash = "sha256-K7AvCt2GMwo+mtTqa3c0OGUGM3Whfo/WfeYG/Vjxhtg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lasuite-docs-frontend";
|
||||
version = "4.8.6";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "suitenumerique";
|
||||
repo = "docs";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-8xMHHyj9qUdrd5dFYVlN2bi7EVjcEqoBBxIifC8xk3k=";
|
||||
hash = "sha256-yjcnXC46C2Z453oN4/fJc2q+B0yQKL3jKaIIpRlzu5s=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/src/frontend";
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${finalAttrs.src}/src/frontend/yarn.lock";
|
||||
hash = "sha256-4jaKWepa3+SxEVS+gF5QrOeJaOpS8vzFXZyN9SxClUE=";
|
||||
hash = "sha256-K7AvCt2GMwo+mtTqa3c0OGUGM3Whfo/WfeYG/Vjxhtg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
yarnConfigHook,
|
||||
}:
|
||||
let
|
||||
version = "4.8.6";
|
||||
version = "5.0.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "suitenumerique";
|
||||
repo = "docs";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-8xMHHyj9qUdrd5dFYVlN2bi7EVjcEqoBBxIifC8xk3k=";
|
||||
hash = "sha256-yjcnXC46C2Z453oN4/fJc2q+B0yQKL3jKaIIpRlzu5s=";
|
||||
};
|
||||
|
||||
mail-templates = stdenv.mkDerivation {
|
||||
@@ -29,7 +29,7 @@ let
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/src/mail/yarn.lock";
|
||||
hash = "sha256-B2vtdQYFhhsA7dK5nwAJl65kaedspfYySJJBjVwYeBM=";
|
||||
hash = "sha256-g5MYtHvs0i0AOAydMxJNx1xTwbZtXS0CYDNQC+cnIOM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -57,9 +57,17 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
./postgresql_fix.patch
|
||||
];
|
||||
|
||||
# They use a old version of mistralai which exported a class
|
||||
# at the top level
|
||||
postPatch = ''
|
||||
substituteInPlace core/services/ai_services/legacy.py \
|
||||
--replace-fail \
|
||||
"from mistralai import Mistral" \
|
||||
"from mistralai.client import Mistral"
|
||||
''
|
||||
# Otherwise fails with:
|
||||
# socket.gaierror: [Errno 8] nodename nor servname provided, or not known
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace impress/settings.py \
|
||||
--replace-fail \
|
||||
"gethostname()" \
|
||||
@@ -75,6 +83,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
beautifulsoup4
|
||||
boto3
|
||||
celery
|
||||
emoji
|
||||
django
|
||||
django-configurations
|
||||
django-cors-headers
|
||||
@@ -100,6 +109,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
langfuse
|
||||
lxml
|
||||
markdown
|
||||
mistralai
|
||||
mozilla-django-oidc
|
||||
nested-multipart-parser
|
||||
openai
|
||||
|
||||
Reference in New Issue
Block a user