flake: remove package

This commit is contained in:
Guanran Wang 2024-09-14 19:22:44 +08:00
parent de29df20b3
commit 21e917990e
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
2 changed files with 2 additions and 39 deletions

View file

@ -19,36 +19,17 @@
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system: let
inherit (inputs.nixpkgs) lib;
pkgs = inputs.nixpkgs.legacyPackages.${system};
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
runtimeDeps = with pkgs; [
# mason / tree-sitter
gcc
cargo
nodejs
# telescope
ripgrep
fd
];
src = lib.fileset.toSource {
fileset = lib.fileset.fileFilter (file: file.hasExt "lua") ./.;
root = ./.;
};
in {
### nix {run,shell,build}
packages.default = pkgs.callPackage ./package.nix {inherit runtimeDeps src;};
### nix fmt
formatter = treefmtEval.config.build.wrapper;
### nix flake check
checks = {formatting = treefmtEval.config.build.check inputs.self;};
checks.formatting = treefmtEval.config.build.check inputs.self;
### nix develop
devShells.default = pkgs.mkShell {
devShells.default = pkgs.mkShellNoCC {
nativeBuildInputs = with pkgs; [
stylua
];

View file

@ -1,18 +0,0 @@
{
lib,
wrapNeovimUnstable,
neovim-unwrapped,
neovimUtils,
runtimeDeps ? null,
src ? null,
...
} @ args:
wrapNeovimUnstable neovim-unwrapped (neovimUtils.makeNeovimConfig args
// {
# FIXME: append instead of override the entire wrapperArgs
wrapperArgs = ["--prefix" "PATH" ":" "${lib.makeBinPath runtimeDeps}"];
luaRcContent = ''
vim.cmd [[set runtimepath^=${src}]]
${builtins.readFile "${src}/init.lua"}
'';
})