Mostly working Cryptpad

This commit is contained in:
Quentin 2022-05-06 17:55:23 +02:00
parent 071e87a202
commit 1a6371d8d5
Signed by untrusted user: quentin
GPG key ID: E9602264D639FF68
2 changed files with 5 additions and 3 deletions

View file

@ -37,20 +37,23 @@ in
# clear executable files inside the node_modules folder to reduce dependencies # clear executable files inside the node_modules folder to reduce dependencies
# and attack surface # and attack surface
find node_modules -type f ! -path 'node_modules/gar/*' -executable -print | tee >(xargs -n 20 rm) find node_modules -type f ! -path 'node_modules/gar/*' -executable -print | tee >(xargs -n 20 rm)
# Remove only office that IS BIG
rm -rf www/onlyoffice
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/{bin,opt} mkdir -p $out/{bin,opt}
# copy the source code # copy the source code
cp -r customize.dist lib server.js www $out/opt/ cp -r .bowerrc bower.json package.json package-lock.json customize.dist lib server.js www $out/opt/
# mount node_modules # mount node_modules
cp -r node_modules $out/opt/node_modules cp -r node_modules $out/opt/node_modules
# mount bower, based on the .bowerrc file at the git repo root # mount bower, based on the .bowerrc file at the git repo root
cp -r ${bower} $out/opt/www/bower_components cp -r ${bower}/bower_components $out/opt/www/
# cryptpad is bugged with absolute path, this is a workaround to use absolute path as relative path # cryptpad is bugged with absolute path, this is a workaround to use absolute path as relative path
ln -s / $out/opt/root ln -s / $out/opt/root

View file

@ -1 +0,0 @@
/nix/store/ggmvxhv9dz3j9j2g9mb9j3zpq46c8r62-docker-image-cryptpad.tar.gz