Skip to content

Commit 7502af5

Browse files
bobvanderlindenwolfgangwalther
authored andcommitted
bitwarden-cli: remove dangling symlinks in output
1 parent ef93ff1 commit 7502af5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkgs/by-name/bi/bitwarden-cli/package.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ buildNpmPackage rec {
5050

5151
npmFlags = [ "--legacy-peer-deps" ];
5252

53-
# FIXME temporarily disable the symlink check as there are symlink after the build in the `node_modules/@bitwarden` directory linking to `../../`.
54-
dontCheckForBrokenSymlinks = true;
55-
5653
npmRebuildFlags = [
5754
# FIXME one of the esbuild versions fails to download @esbuild/linux-x64
5855
"--ignore-scripts"
@@ -72,6 +69,13 @@ buildNpmPackage rec {
7269
shopt -u globstar
7370
'';
7471

72+
postInstall = ''
73+
# The @bitwarden modules are actually npm workspaces inside the source tree, which
74+
# leave dangling symlinks behind. They can be safely removed, because their source is
75+
# bundled via webpack and thus not needed at run-time.
76+
rm -rf $out/lib/node_modules/@bitwarden/clients/node_modules/{@bitwarden,.bin}
77+
'';
78+
7579
passthru = {
7680
tests = {
7781
vaultwarden = nixosTests.vaultwarden.sqlite;

0 commit comments

Comments
 (0)