diff --git a/nix/kernel-tests.nix b/nix/kernel-tests.nix
index f243ca6a08c4858c429a634b04997663c1145329..91451c9310cfb8e9a187abf8c422d2f2954308e2 100644
--- a/nix/kernel-tests.nix
+++ b/nix/kernel-tests.nix
@@ -20,5 +20,6 @@ mk_tests {
       src/plugins/server/tests/batch \
       tests/fc_script \
       tests/syntax
+    make -C share/machdeps check-schema
   '';
 }
diff --git a/nix/mk_tests.nix b/nix/mk_tests.nix
index 9d71cbf776d6cb7f4c005b4d14be62c03abce397..ceab5c12649c87c2822ba1fc6faa433ac6658654 100644
--- a/nix/mk_tests.nix
+++ b/nix/mk_tests.nix
@@ -30,6 +30,7 @@
 , clang
 , frama-c
 , perl
+, python3Packages
 , stdenvNoCC
 , time
 , unixtools
@@ -56,6 +57,7 @@ stdenvNoCC.mkDerivation {
     clang
     frama-c
     perl
+    python3Packages.jsonschema
     time
     unixtools.getopt
     yq
diff --git a/share/machdeps/Makefile b/share/machdeps/Makefile
index a05ad92aa8e23a9c79d49febadeaccef71566bd9..5ab36af3da03d87f3de10f582b3c03c2660409de 100644
--- a/share/machdeps/Makefile
+++ b/share/machdeps/Makefile
@@ -46,3 +46,10 @@ machdep_%.yaml: machdep_gcc_%.yaml Makefile
 	@echo "Checking $*"
 	@./make_machdep/make_machdep.py --from-file $* --check-only
 	@touch $@
+
+.PHONY: check-schema
+
+check-schema:
+	@$(foreach machdep, $(wildcard machdep_*.yaml), \
+           ./make_machdep/make_machdep.py --from-file $(machdep) --check-only \
+           || echo "$(machdep) does not conform to machdep schema";)