mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-19 13:30:17 +00:00
60 lines
1.1 KiB
Nix
60 lines
1.1 KiB
Nix
{
|
|
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
|
|
'';
|
|
})
|