outline: fix broken links to public assets

Revert changes in 06a70ad.
Instead, use symlink to fix the issue that 06a70ad tries to solve.
This commit is contained in:
Wei Ren 2023-02-18 16:08:27 -06:00
parent 6c5bf4e060
commit 5f29a5628b

View File

@ -56,15 +56,16 @@ stdenv.mkDerivation rec {
runHook preInstall
mkdir -p $out/bin $out/share/outline
mv node_modules build $out/share/outline/
mv public node_modules build $out/share/outline/
node_modules=$out/share/outline/node_modules
build=$out/share/outline/build
# On NixOS the WorkingDirectory is set to the build directory, as
# this contains files needed in the onboarding process. This folder
# must also contain the `public` folder for mail notifications to
# work, as it contains the mail templates.
mv public $out/share/outline/build
node_modules=$out/share/outline/node_modules
build=$out/share/outline/build
ln -s $out/share/outline/public $build/public
makeWrapper ${nodejs}/bin/node $out/bin/outline-server \
--add-flags $build/server/index.js \