hedgedoc: fix executing scripts, delete unused setup script

This commit is contained in:
Sandro Jäckel
2024-05-21 14:29:09 +02:00
parent 5f9ea7a0d9
commit 10cadef027
+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