dprint-plugins: add installCheckPhase
Co-authored-by: Phani Rithvij <phanirithvij2000@gmail.com>
This commit is contained in:
parent
494e8180e3
commit
579e66c5f1
@ -2,6 +2,8 @@
|
||||
lib,
|
||||
fetchurl,
|
||||
stdenv,
|
||||
dprint,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
let
|
||||
mkDprintPlugin =
|
||||
@ -34,6 +36,21 @@ let
|
||||
mkdir -p $out
|
||||
cp $src $out/plugin.wasm
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [
|
||||
dprint
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
# Prevent schema unmatching errors
|
||||
# See https://github.com/NixOS/nixpkgs/pull/369415#issuecomment-2566112144 for detail
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
mkdir empty && cd empty
|
||||
dprint check --allow-no-files --plugins "$out/plugin.wasm"
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
passthru = {
|
||||
updateScript = ./update-plugins.py;
|
||||
inherit initConfig updateUrl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user