prettier-plugin-svelte: skip npm prune step; remove redundant build deps

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I296b2b0b59f6eaec0563c97c011d4a356a6a6964
This commit is contained in:
raf 2026-04-17 18:50:42 +03:00
commit e1340c0aeb
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -17,11 +17,12 @@ in
npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw="; npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw=";
# FIXME: this probably also copies over build dependencies. dontNpmPrune = true;
# Look at how other prettier plugins in nixpkgs do things. I couldn't get it to work
# and am out of time so good luck :) # Fixes error: Cannot find module 'prettier'
preInstall = '' postInstall = ''
mkdir -p $out/lib pushd "$nodeModulesPath"
cp -r node_modules $out find -mindepth 1 -maxdepth 1 -type d -print0 | grep --null-data -Exv "\./(ulid|prettier)" | xargs -0 rm -rfv
popd
''; '';
}) })