mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-19 13:30:17 +00:00
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-zejYnwkj6CBWOqA6LBYBEXMg0jT2vJqinBwzKdWIqpY=";
|
|
|
|
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
|
|
'';
|
|
})
|