mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-20 22:08:47 +00:00
languages/pug: init
This commit is contained in:
parent
cd45295f9c
commit
75b585be2d
6 changed files with 208 additions and 0 deletions
60
flake/pkgs/by-name/prettier-plugin-pug/package.nix
Normal file
60
flake/pkgs/by-name/prettier-plugin-pug/package.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
stdenv,
|
||||
nodejs,
|
||||
gitMinimal,
|
||||
pnpm_9,
|
||||
pnpmConfigHook,
|
||||
fetchPnpmDeps,
|
||||
pins,
|
||||
fetchFromGitHub,
|
||||
writableTmpDirAsHomeHook,
|
||||
}: let
|
||||
pin = pins.prettier-plugin-pug;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "prettier-plugin-pug";
|
||||
version = pin.version or pin.revision;
|
||||
|
||||
patches = [
|
||||
./0001-fix-don-t-touch-git-state-while-building.patch
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit (pin.repository) owner repo;
|
||||
rev = finalAttrs.version;
|
||||
sha256 = pin.hash;
|
||||
};
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
pnpm = pnpm_9;
|
||||
inherit (finalAttrs) pname src;
|
||||
fetcherVersion = 2;
|
||||
hash = "sha256-4IS2dvcODzeakx8ezIQkoz6PLEP8Sm4OFz0EWQ0jXoA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
gitMinimal
|
||||
writableTmpDirAsHomeHook
|
||||
(pnpmConfigHook.overrideAttrs {
|
||||
propagatedBuildInputs = [pnpm_9];
|
||||
})
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
pnpm run build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp -r dist/ $out
|
||||
cp -r node_modules $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue