bitwarden-cli: reduce closure size (#364275)

This commit is contained in:
Robert Schütz 2024-12-13 08:20:19 -08:00 committed by GitHub
commit 2aa4a28178
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,20 @@ buildNpmPackage rec {
npmFlags = [ "--legacy-peer-deps" ];
postConfigure = ''
# we want to build everything from source
shopt -s globstar
rm -r node_modules/**/prebuilds
shopt -u globstar
'';
postBuild = ''
# remove build artifacts that bloat the closure
shopt -s globstar
rm -r node_modules/**/{*.target.mk,binding.Makefile,config.gypi,Makefile,Release/.deps}
shopt -u globstar
'';
passthru = {
tests = {
vaultwarden = nixosTests.vaultwarden.sqlite;