bitwarden-cli: remove dangling symlinks in output

This commit is contained in:
Bob van der Linden
2025-02-21 20:28:10 +01:00
committed by Wolfgang Walther
parent ef93ff1ba9
commit 7502af5e86
+7 -3
View File
@@ -50,9 +50,6 @@ buildNpmPackage rec {
npmFlags = [ "--legacy-peer-deps" ];
# FIXME temporarily disable the symlink check as there are symlink after the build in the `node_modules/@bitwarden` directory linking to `../../`.
dontCheckForBrokenSymlinks = true;
npmRebuildFlags = [
# FIXME one of the esbuild versions fails to download @esbuild/linux-x64
"--ignore-scripts"
@@ -72,6 +69,13 @@ buildNpmPackage rec {
shopt -u globstar
'';
postInstall = ''
# The @bitwarden modules are actually npm workspaces inside the source tree, which
# leave dangling symlinks behind. They can be safely removed, because their source is
# bundled via webpack and thus not needed at run-time.
rm -rf $out/lib/node_modules/@bitwarden/clients/node_modules/{@bitwarden,.bin}
'';
passthru = {
tests = {
vaultwarden = nixosTests.vaultwarden.sqlite;