diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/neovim')
5 files changed, 41 insertions, 25 deletions
diff --git a/nixpkgs/pkgs/applications/editors/neovim/default.nix b/nixpkgs/pkgs/applications/editors/neovim/default.nix index e183799d853a..60035e3f1b58 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/default.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/default.nix @@ -43,7 +43,6 @@ let luabitop mpack ] ++ lib.optionals doCheck [ - nvim-client luv coxpcall busted @@ -70,13 +69,13 @@ let in stdenv.mkDerivation rec { pname = "neovim-unwrapped"; - version = "0.9.4"; + version = "0.9.5"; src = fetchFromGitHub { owner = "neovim"; repo = "neovim"; rev = "v${version}"; - hash = "sha256-Lyo98cAs7Zhx23N4s4f3zpWFKYJMmXleWpt3wiVDQZo="; + hash = "sha256-CcaBqA0yFCffNPmXOJTo8c9v1jrEBiqAl8CG5Dj5YxE="; }; patches = [ diff --git a/nixpkgs/pkgs/applications/editors/neovim/neovide/default.nix b/nixpkgs/pkgs/applications/editors/neovim/neovide/default.nix index ccd7d754e44c..6840ac60919c 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/neovide/default.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/neovide/default.nix @@ -25,16 +25,16 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { pname = "neovide"; - version = "0.11.2"; + version = "0.12.0"; src = fetchFromGitHub { owner = "neovide"; repo = "neovide"; rev = version; - sha256 = "sha256-JCSFG7W4I1uXsVM7J059tHYq/DB16AZfGjsG0UvfctE="; + sha256 = "sha256-m3ZdzdmkW69j1sZ9h7M1m5fDNnJ7BM7nwYPx7QhsIso="; }; - cargoSha256 = "sha256-rH4jjbd0C1MKu3RE0bLvLo4iqyUXr0DvCudvFs1F+AA="; + cargoSha256 = "sha256-AAHMx4xxbC/JdmAPE2bub7qdF5sFNWjqXI1nuCUxsZA="; SKIA_SOURCE_DIR = let @@ -42,8 +42,8 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { owner = "rust-skia"; repo = "skia"; # see rust-skia:skia-bindings/Cargo.toml#package.metadata skia - rev = "m113-0.61.8"; - sha256 = "sha256-xGfkc1JLBGQW4WcblFyluZ2paEuisCVPNDU4Rfkv3BE="; + rev = "m119-0.67.3"; + sha256 = "sha256-U75NuJnQa5+SNlOrsBmdlvflGdjo3el63EeIsbnE7ms="; }; # The externals for skia are taken from skia/DEPS externals = linkFarm "skia-externals" (lib.mapAttrsToList @@ -116,5 +116,7 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec { changelog = "https://github.com/neovide/neovide/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ ck3d multisn8 ]; + platforms = platforms.all; + badPlatforms = platforms.darwin; }; } diff --git a/nixpkgs/pkgs/applications/editors/neovim/neovide/skia-externals.json b/nixpkgs/pkgs/applications/editors/neovim/neovide/skia-externals.json index 82730f5458a3..e57814e2a2d8 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/neovide/skia-externals.json +++ b/nixpkgs/pkgs/applications/editors/neovim/neovide/skia-externals.json @@ -6,8 +6,8 @@ }, "libjpeg-turbo": { "url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git", - "rev": "22f1a22c99e9dde8cd3c72ead333f425c5a7aa77", - "sha256": "sha256-5MaYvyrhADFGKBxcS3kbKcn9tj0FNXAN/rAXXYW6ljs=" + "rev": "ed683925e4897a84b3bffc5c1414c85b97a129a3", + "sha256": "sha256-DYJP3phe4OzCtRN2pMc07ITTWR8MuIlOWWg9PBsQAVw=" }, "icu": { "url": "https://chromium.googlesource.com/chromium/deps/icu.git", @@ -21,13 +21,13 @@ }, "harfbuzz": { "url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git", - "rev": "09a266236147497bd8149240062c31c16fbc81e3", - "sha256": "sha256-NLydUJI15zRBFFDc7VRDXjgc0AwS3l6GMt2usMWOSG4=" + "rev": "4cfc6d8e173e800df086d7be078da2e8c5cfca19", + "sha256": "sha256-rrstyAz7Eb8ZgFJZKUASY8nU4YFZAptd5VS9B2cs2Yg=" }, "wuffs": { "url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git", - "rev": "a0041ac0310b3156b963e2f2bea09245f25ec073", - "sha256": "sha256-obRMrrKY3rPdFwQNa5IplpuKqiodHvRC8jbIOjp7R2w=" + "rev": "e3f919ccfe3ef542cfc983a82146070258fb57f8", + "sha256": "sha256-373d2F/STcgCHEq+PO+SCHrKVOo6uO1rqqwRN5eeBCw=" }, "libpng": { "url": "https://skia.googlesource.com/third_party/libpng.git", diff --git a/nixpkgs/pkgs/applications/editors/neovim/tests/default.nix b/nixpkgs/pkgs/applications/editors/neovim/tests/default.nix index a7e0e4c77057..cbe811c33b68 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/tests/default.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/tests/default.nix @@ -74,9 +74,12 @@ let }) ('' source ${nmt}/bash-lib/assertions.sh vimrc="${writeText "init.vim" neovim-drv.initRc}" + luarc="${writeText "init.lua" neovim-drv.luaRcContent}" + luarcGeneric="$out/patched.lua" vimrcGeneric="$out/patched.vim" mkdir $out ${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$vimrc" > "$vimrcGeneric" + ${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$luarc" > "$luarcGeneric" '' + buildCommand); in @@ -89,6 +92,9 @@ rec { nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix; singlelinesconfig = runTest (wrapNeovim2 "-single-lines" nvimConfSingleLines) '' + assertFileContains \ + "$luarcGeneric" \ + "vim.cmd.source \"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-init.vim" assertFileContent \ "$vimrcGeneric" \ "${./init-single-lines.vim}" diff --git a/nixpkgs/pkgs/applications/editors/neovim/wrapper.nix b/nixpkgs/pkgs/applications/editors/neovim/wrapper.nix index d61a2fe5e5a8..29146a769843 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/wrapper.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/wrapper.nix @@ -32,16 +32,28 @@ let # set to false if you want to control where to save the generated config # (e.g., in ~/.config/init.vim or project/.nvimrc) , wrapRc ? true - , neovimRcContent ? "" + # vimL code that should be sourced as part of the generated init.lua file + , neovimRcContent ? null + # lua code to put into the generated init.lua file + , luaRcContent ? "" # entry to load in packpath , packpathDirs , ... }: + assert withPython2 -> throw "Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env."; + + stdenv.mkDerivation (finalAttrs: let + rcContent = '' + ${luaRcContent} + '' + lib.optionalString (!isNull neovimRcContent) '' + vim.cmd.source "${writeText "init.vim" neovimRcContent}" + ''; + wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs; - commonWrapperArgs = + generatedWrapperArgs = # vim accepts a limited number of commands so we join them all [ "--add-flags" ''--cmd "lua ${providerLuaRc}"'' @@ -66,15 +78,12 @@ let finalMakeWrapperArgs = [ "${neovim-unwrapped}/bin/nvim" "${placeholder "out"}/bin/nvim" ] ++ [ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ] - ++ lib.optionals wrapRc [ "--add-flags" "-u ${writeText "init.vim" neovimRcContent}" ] - ++ commonWrapperArgs + ++ lib.optionals finalAttrs.wrapRc [ "--add-flags" "-u ${writeText "init.lua" rcContent}" ] + ++ finalAttrs.generatedWrapperArgs ; perlEnv = perl.withPackages (p: [ p.NeovimExt p.Appcpanminus ]); - in - assert withPython2 -> throw "Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env."; - - stdenv.mkDerivation (finalAttrs: { + in { name = "neovim-${lib.getVersion neovim-unwrapped}${extraName}"; __structuredAttrs = true; @@ -83,8 +92,8 @@ let inherit wrapRc providerLuaRc packpathDirs; inherit python3Env rubyEnv; withRuby = rubyEnv != null; - inherit wrapperArgs; - + inherit wrapperArgs generatedWrapperArgs; + luaRcContent = rcContent; # Remove the symlinks created by symlinkJoin which we need to perform # extra actions upon postBuild = lib.optionalString stdenv.isLinux '' @@ -112,7 +121,7 @@ let '' + lib.optionalString (manifestRc != null) (let manifestWrapperArgs = - [ "${neovim-unwrapped}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ] ++ commonWrapperArgs; + [ "${neovim-unwrapped}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ] ++ finalAttrs.generatedWrapperArgs; in '' echo "Generating remote plugin manifest" export NVIM_RPLUGIN_MANIFEST=$out/rplugin.vim |