1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/lib/python/validate-maintainers-syntax.py
Austin Horstman defabc11ab ci: move validate maintainers logic to lib
Allow easily running the individual checks outside of GHA for easier
testing/modification.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-17 15:15:39 -05:00

25 lines
593 B
Python
Executable file

#!/usr/bin/env python3
"""
Validate maintainers.nix syntax
This script validates that the maintainers.nix file has valid Nix syntax.
"""
import subprocess
import sys
def main():
print("🔍 Validating maintainers.nix syntax...")
try:
subprocess.run(['nix', 'eval', '--file', 'modules/lib/maintainers.nix', '--json'],
capture_output=True, text=True, check=True)
print("✅ Valid Nix syntax")
except subprocess.CalledProcessError:
print("❌ Invalid Nix syntax")
sys.exit(1)
if __name__ == "__main__":
main()