bitwarden-cli: remove dangling symlinks in output
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user