Merge pull request #312495 from SuperSandro2000/hedgedoc-cli

This commit is contained in:
Sandro
2024-05-23 13:06:31 +02:00
committed by GitHub
+9 -5
View File
@@ -55,6 +55,10 @@ in stdenv.mkDerivation {
python3 # needed for sqlite node-gyp
];
buildInputs = [
nodejs
];
dontConfigure = true;
buildPhase = ''
@@ -75,7 +79,8 @@ in stdenv.mkDerivation {
yarn --immutable-cache
yarn run build
rm bin/heroku
# Delete scripts that are not useful for NixOS
rm bin/{heroku,setup}
patchShebangs bin/*
runHook postBuild
@@ -85,11 +90,10 @@ in stdenv.mkDerivation {
runHook preInstall
mkdir -p $out/share/hedgedoc
cp -r bin $out
cp -r {app.js,lib,locales,node_modules,package.json,public} $out/share/hedgedoc
cp -r {app.js,bin,lib,locales,node_modules,package.json,public} $out/share/hedgedoc
for bin in $out/bin/*; do
wrapProgram $bin \
for bin in $out/share/hedgedoc/bin/*; do
makeWrapper $bin $out/bin/$(basename $bin) \
--set NODE_ENV production \
--set NODE_PATH "$out/share/hedgedoc/lib/node_modules"
done