hedgedoc: move files to share/hedeodc in the package

This commit is contained in:
Sandro Jäckel 2024-02-06 19:14:17 +01:00
parent 26316368cb
commit e91a7b7a4e
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 9 additions and 8 deletions

View File

@ -236,9 +236,9 @@ in
};
services.hedgedoc.settings = {
defaultNotePath = lib.mkDefault "${cfg.package}/public/default.md";
docsPath = lib.mkDefault "${cfg.package}/public/docs";
viewPath = lib.mkDefault "${cfg.package}/public/views";
defaultNotePath = lib.mkDefault "${cfg.package}/share/hedgedoc/public/default.md";
docsPath = lib.mkDefault "${cfg.package}/share/hedgedoc/public/docs";
viewPath = lib.mkDefault "${cfg.package}/share/hedgedoc/public/views";
};
systemd.services.hedgedoc = {

View File

@ -84,18 +84,19 @@ in stdenv.mkDerivation {
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R {app.js,bin,lib,locales,node_modules,package.json,public} $out
mkdir -p $out/share/hedgedoc
cp -r bin $out
cp -r {app.js,lib,locales,node_modules,package.json,public} $out/share/hedgedoc
for bin in $out/bin/*; do
wrapProgram $bin \
--set NODE_ENV production \
--set NODE_PATH "$out/lib/node_modules"
--set NODE_PATH "$out/share/hedgedoc/lib/node_modules"
done
makeWrapper ${nodejs}/bin/node $out/bin/hedgedoc \
--add-flags $out/app.js \
--add-flags $out/share/hedgedoc/app.js \
--set NODE_ENV production \
--set NODE_PATH "$out/lib/node_modules"
--set NODE_PATH "$out/share/hedgedoc/lib/node_modules"
runHook postInstall
'';