mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #313957 from NixOS/backport-312495-to-release-24.05
[Backport release-24.05] hedgedoc: fix executing scripts
This commit is contained in:
commit
21f02582dc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user