From 29350f383e1ec6eda2a6a4eca076086339c3ad3c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Dec 2024 15:33:44 +0100 Subject: [PATCH] neovim-unwrapped: add versionCheckHook and updateScript --- pkgs/by-name/ne/neovim-unwrapped/package.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index f95d0cb6da7dd..48776af163dea 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -18,6 +18,8 @@ fixDarwinDylibNames, glibcLocales ? null, procps ? null, + versionCheckHook, + nix-update-script, # now defaults to false because some tests can be flaky (clipboard etc), see # also: https://github.com/neovim/neovim/issues/16233 @@ -102,7 +104,7 @@ stdenv.mkDerivation ( src = fetchFromGitHub { owner = "neovim"; repo = "neovim"; - rev = "refs/tags/v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-nmnEyHE/HcrwK+CyJHNoLG0BqjnWleiBy0UYcJL7Ecc="; }; @@ -246,6 +248,16 @@ stdenv.mkDerivation ( separateDebugInfo = true; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = [ "--version" ]; + doInstallCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + meta = { description = "Vim text editor fork focused on extensibility and agility"; longDescription = '' @@ -257,6 +269,7 @@ stdenv.mkDerivation ( - Improve extensibility with a new plugin architecture ''; homepage = "https://www.neovim.io"; + changelog = "https://github.com/neovim/neovim/releases/tag/${finalAttrs.src.tag}"; mainProgram = "nvim"; # "Contributions committed before b17d96 by authors who did not sign the # Contributor License Agreement (CLA) remain under the Vim license.