mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I296b2b0b59f6eaec0563c97c011d4a356a6a6964
28 lines
686 B
Nix
28 lines
686 B
Nix
{
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
pins,
|
|
}: let
|
|
pin = pins.prettier-plugin-svelte;
|
|
in
|
|
buildNpmPackage (finalAttrs: {
|
|
pname = "prettier-plugin-svelte";
|
|
version = pin.version or pin.revision;
|
|
|
|
src = fetchFromGitHub {
|
|
inherit (pin.repository) owner repo;
|
|
rev = finalAttrs.version;
|
|
sha256 = pin.hash;
|
|
};
|
|
|
|
npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw=";
|
|
|
|
dontNpmPrune = true;
|
|
|
|
# Fixes error: Cannot find module 'prettier'
|
|
postInstall = ''
|
|
pushd "$nodeModulesPath"
|
|
find -mindepth 1 -maxdepth 1 -type d -print0 | grep --null-data -Exv "\./(ulid|prettier)" | xargs -0 rm -rfv
|
|
popd
|
|
'';
|
|
})
|