feat(nix): add support for recursive and inherit attributes

This commit is contained in:
Hoang Nguyen 2023-11-19 00:00:00 +07:00
parent 7cf719975b
commit 0e96d96e8c
No known key found for this signature in database
GPG key ID: B0567C20730E9B11
2 changed files with 19 additions and 1 deletions

View file

@ -2,6 +2,10 @@
("{" @delimiter)
("}" @delimiter @sentinel)) @container
(rec_attrset_expression
("{" @delimiter)
("}" @delimiter @sentinel)) @container
(formals
("{" @delimiter)
("}" @delimiter @sentinel)) @container
@ -17,3 +21,7 @@
(interpolation
("${" @delimiter)
("}" @delimiter @sentinel)) @container
(inherit_from
"(" @delimiter
")" @delimiter @sentinel) @container

View file

@ -23,9 +23,11 @@
];
in
flake-utils.lib.eachSystem supportedSystems (system: let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
formatting = pre-commit-hooks.lib.${system}.run {
src = self;
src = lib.cleanSource self;
hooks = {
alejandra.enable = true;
markdownlint.enable = true;
@ -37,6 +39,14 @@
};
};
in {
apps = rec {
hi = with pkgs; flake-utils.lib.mkApp {
drv = writeShellScriptBin "hi" ''
echo "Hello, world"
'';
};
default = hi;
};
packages = {
};
checks = {