package: add prettier-plugin-astro

This commit is contained in:
Ching Pei Yang 2025-10-14 20:28:22 +02:00
commit db30023c78
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
2 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{
stdenv,
fetchFromGitHub,
nodejs,
pnpm_9,
pins,
}: let
pin = pins.prettier-plugin-astro;
in
stdenv.mkDerivation (finalAttrs: {
pname = "prettier-plugin-astro";
version = pin.version or pin.revision;
src = fetchFromGitHub {
inherit (pin.repository) owner repo;
rev = finalAttrs.version;
sha256 = pin.hash;
};
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname src;
fetcherVersion = 2;
hash = "sha256-K7pIWLkIIbUKDIcysfEtcf/eVMX9ZgyFHdqcuycHCNE=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
];
buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
# mkdir -p $out/dist
cp -r dist/ $out
cp -r node_modules $out
runHook postInstall
'';
})

View file

@ -2218,6 +2218,22 @@
"url": "https://github.com/tris203/precognition.nvim/archive/2aae2687207029b3611a0e19a289f9e1c7efbe16.tar.gz",
"hash": "0b4yz5jvqd0li373067cs1n761vn9jxkhcvhsrvm9h1snqw1c6nk"
},
"prettier-plugin-astro": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "withastro",
"repo": "prettier-plugin-astro"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "v0.14.1",
"revision": "57234893ca374c8e401cce1f931180d314e13eac",
"url": "https://api.github.com/repos/withastro/prettier-plugin-astro/tarball/v0.14.1",
"hash": "14ffwxggcnyc947pdxgsgz1v2q76m5xmybfxg8kyla4l7phg6qsw"
},
"project-nvim": {
"type": "Git",
"repository": {