diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
| commit | d3261e64152397db2dca4d691a990c6bc2a6f4dd (patch) | |
| tree | fac2f7be638651181a72453d714f0f96675c2b8b /archived/projt-launcher/ci/parse.nix | |
| parent | 31b9a8949ed0a288143e23bf739f2eb64fdc63be (diff) | |
| download | Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.tar.gz Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.zip | |
NOISSUE add archived projects
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'archived/projt-launcher/ci/parse.nix')
| -rw-r--r-- | archived/projt-launcher/ci/parse.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/archived/projt-launcher/ci/parse.nix b/archived/projt-launcher/ci/parse.nix new file mode 100644 index 0000000000..96652c7a95 --- /dev/null +++ b/archived/projt-launcher/ci/parse.nix @@ -0,0 +1,38 @@ +# ProjT Launcher Nix File Parser +# Validates all .nix files in the project for syntax errors + +{ + lib, + nix, + runCommand, +}: +let + nixFiles = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.fileFilter (file: file.hasExt "nix") ../.; + }; +in +runCommand "projt-nix-parse-${nix.name}" + { + nativeBuildInputs = [ + nix + ]; + } + '' + export NIX_STORE_DIR=$TMPDIR/store + export NIX_STATE_DIR=$TMPDIR/state + nix-store --init + + cd "${nixFiles}" + + echo "Parsing Nix files in ProjT Launcher..." + + # Parse all .nix files to check for syntax errors + find . -type f -iname '*.nix' | while read file; do + echo "Checking: $file" + nix-instantiate --parse "$file" >/dev/null + done + + echo "All Nix files parsed successfully!" + touch $out + '' |
