mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-09 15:05:30 +00:00
package: add prettier-plugin-astro
This commit is contained in:
parent
b49e18ffb5
commit
db30023c78
2 changed files with 64 additions and 0 deletions
48
flake/pkgs/by-name/prettier-plugin-astro/package.nix
Normal file
48
flake/pkgs/by-name/prettier-plugin-astro/package.nix
Normal 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
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue