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,
|
lib,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
dprint,
|
||||||
|
writableTmpDirAsHomeHook,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
mkDprintPlugin =
|
mkDprintPlugin =
|
||||||
@ -34,6 +36,21 @@ let
|
|||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp $src $out/plugin.wasm
|
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 = {
|
passthru = {
|
||||||
updateScript = ./update-plugins.py;
|
updateScript = ./update-plugins.py;
|
||||||
inherit initConfig updateUrl;
|
inherit initConfig updateUrl;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user