feat: add luvit-meta (#3)

* chore: add .envrc

* feat: add luvit-meta
This commit is contained in:
Marc Jakobi 2024-08-19 19:53:14 +02:00 committed by GitHub
parent 021e8078e4
commit afd15ca69f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 3 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake .# -Lv

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
.luarc.json .luarc.json
result/ result-*
.direnv

View file

@ -18,6 +18,22 @@
"type": "github" "type": "github"
} }
}, },
"luvit-meta": {
"flake": false,
"locked": {
"lastModified": 1705776742,
"narHash": "sha256-zAAptV/oLuLAAsa2zSB/6fxlElk4+jNZd/cPr9oxFig=",
"owner": "Bilal2453",
"repo": "luvit-meta",
"rev": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60",
"type": "github"
},
"original": {
"owner": "Bilal2453",
"repo": "luvit-meta",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718714799, "lastModified": 1718714799,
@ -49,6 +65,7 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"luvit-meta": "luvit-meta",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -4,12 +4,17 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
luvit-meta = {
url = "github:Bilal2453/luvit-meta";
flake = false;
};
}; };
outputs = inputs @ { outputs = inputs @ {
self, self,
nixpkgs, nixpkgs,
flake-parts, flake-parts,
luvit-meta,
}: }:
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
systems = [ systems = [
@ -36,11 +41,16 @@
}; };
}; };
flake = { flake = {
overlays.default = final: prev: { overlays.default = final: prev: let
lib = final.lib;
in {
mk-luarc = { mk-luarc = {
# list of plugins that have a /lua directory # list of plugins that have a /lua directory
nvim ? final.neovim-unwrapped, nvim ? final.neovim-unwrapped,
plugins ? [], plugins ? [],
meta ? {
luvit = true;
},
lua-version ? "5.1", lua-version ? "5.1",
disabled-diagnostics ? [], disabled-diagnostics ? [],
}: let }: let
@ -77,7 +87,8 @@
] ]
++ plugin-luadirs ++ plugin-luadirs
++ pkg-libdirs ++ pkg-libdirs
++ pkg-sharedirs; ++ pkg-sharedirs
++ (lib.optional (meta.luvit or false) "${luvit-meta}/library");
ignoreDir = [ ignoreDir = [
".git" ".git"
".github" ".github"