diff options
| author | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-20 19:01:29 +0000 |
|---|---|---|
| committer | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-20 19:01:29 +0000 |
| commit | 35963dd065bcd331f611e6dceb77db4603bcbc1f (patch) | |
| tree | d2c6ff1fcd724c0550bb149a9c22042bdf8772dc | |
| parent | e53b47c44606d7c97ae71dd6cc15bbde203e426c (diff) | |
| download | nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar.gz nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar.bz2 nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar.lz nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar.xz nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.tar.zst nixtaml-35963dd065bcd331f611e6dceb77db4603bcbc1f.zip | |
Nix check overlay
| -rw-r--r-- | nix/overlay/check.nix | 32 | ||||
| -rw-r--r-- | release.nix | 6 |
2 files changed, 34 insertions, 4 deletions
diff --git a/nix/overlay/check.nix b/nix/overlay/check.nix new file mode 100644 index 0000000..8a6ec2b --- /dev/null +++ b/nix/overlay/check.nix @@ -0,0 +1,32 @@ +#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +# SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/> โ +# SPDX-License-Identifier: LGPL-2.1-or-later โ +#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +final: prev: { + nixtamal = prev.nixtamal.overrideScope ( + final': prev': { + check = (prev'.check or { }) // { + EditorConfig = + final.runCommand "check-EditorConfig" + { + src = + let + fs = final.lib.fileset; + in + (fs.toSource { + root = ../..; + fileset = fs.unions [ + (fs.fileFilter (file: file.name == ".editorconfig") ../..) + (fs.fromSource prev'.nixtamal.src) + ../../nix + ]; + }); + } + '' + cd $src + ${final.lib.getExe final.editorconfig-checker} | tee $out + ''; + }; + } + ); +} diff --git a/release.nix b/release.nix index 0e2ad6a..fcb1a39 100644 --- a/release.nix +++ b/release.nix @@ -9,6 +9,7 @@ let overlays = [ (import ./nix/overlay/default.nix) (import ./nix/overlay/development.nix) + (import ./nix/overlay/check.nix) ]; }; in @@ -19,8 +20,5 @@ in shell = pkgs.nixtamal.dev-shell; - test = { - inherit (pkgs.nixtamal) tests; - }; - + check = pkgs.nixtamal.check; } |
