diff --git a/neovim.nix b/neovim.nix index 7398b62..c93961d 100644 --- a/neovim.nix +++ b/neovim.nix @@ -130,8 +130,8 @@ require("dot013") ''; -in - symlinkJoin { + + nvim-derivation = symlinkJoin { name = "neovim-custom"; pname = "nvim"; @@ -160,4 +160,22 @@ in meta = { mainProgram = "nvim"; }; + }; +in + pkgs.stdenv.mkDerivation rec { + name = "Neovim"; + pname = "nvim"; + buildCommand = let + desktopEntry = pkgs.makeDesktopItem { + name = pname; + desktopName = name; + exec = "${lib.getExe nvim-derivation}"; + terminal = true; + }; + in '' + mkdir -p $out/bin + cp ${lib.getExe nvim-derivation} $out/bin + mkdir -p $out/share/applications + cp ${desktopEntry}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop + ''; }