feat: update package definition

This commit is contained in:
Nydragon 2024-10-20 10:43:11 +00:00
parent 173dd593ae
commit 2b17334f38
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
2 changed files with 17 additions and 22 deletions

17
flake.lock generated
View file

@ -1,21 +1,5 @@
{
"nodes": {
"direnv/direnv.vim": {
"flake": false,
"locked": {
"lastModified": 1701514458,
"narHash": "sha256-Lwwm95UEkS8Q0Qsoh10o3sFn48wf7v7eCX/FJJV1HMI=",
"owner": "direnv",
"repo": "direnv.vim",
"rev": "ab2a7e08dd630060cd81d7946739ac7442a4f269",
"type": "github"
},
"original": {
"owner": "direnv",
"repo": "direnv.vim",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1728888510,
@ -34,7 +18,6 @@
},
"root": {
"inputs": {
"direnv/direnv.vim": "direnv/direnv.vim",
"nixpkgs": "nixpkgs"
}
}

View file

@ -38,8 +38,20 @@ let
wl-clipboard
];
in
pkgs.writeShellScriptBin "nvim" ''
pkgs.writeTextFile {
name = "nvim";
executable = true;
destination = "/bin/nvim";
text = ''
#!${pkgs.bash}
export PATH=${lib.makeBinPath deps}:$PATH
export LUA_PATH=${../.}/lua/?.lua
${pkgs.neovim}/bin/nvim -u ${../.}/init.lua $@
''
'';
checkPhase = ''
${pkgs.stdenv.shellDryRun} "$target"
'';
meta = pkgs.neovim.meta // {
mainProgram = "nvim";
};
}