mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
Merge pull request #283501 from SuperSandro2000/hedgedoc-fix-tools-exec
This commit is contained in:
commit
4a9a5fab1c
@ -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 = {
|
||||
@ -263,7 +263,7 @@ in
|
||||
Group = name;
|
||||
|
||||
Restart = "always";
|
||||
ExecStart = "${cfg.package}/bin/hedgedoc";
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
RuntimeDirectory = [ name ];
|
||||
StateDirectory = [ name ];
|
||||
WorkingDirectory = "/run/${name}";
|
||||
|
@ -75,6 +75,7 @@ in stdenv.mkDerivation {
|
||||
yarn --immutable-cache
|
||||
yarn run build
|
||||
|
||||
rm bin/heroku
|
||||
patchShebangs bin/*
|
||||
|
||||
runHook postBuild
|
||||
@ -83,13 +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/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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user