diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index bcc15e19bcc7..aeb2807ce0f7 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -11,6 +11,7 @@ unibilium, utf8proc, tree-sitter, + wasmtime_36, fetchurl, buildPackages, treesitter-parsers ? import ./treesitter-parsers.nix { inherit fetchurl; }, @@ -20,6 +21,7 @@ versionCheckHook, nix-update-script, writableTmpDirAsHomeHook, + wasmSupport ? false, # now defaults to false because some tests can be flaky (clipboard etc), see # also: https://github.com/neovim/neovim/issues/16233 @@ -30,6 +32,9 @@ let lua = if lib.meta.availableOn stdenv.hostPlatform luajit then luajit else lua5_1; + treeSitterForNeovim = tree-sitter.override { + inherit wasmSupport; + }; in stdenv.mkDerivation ( @@ -161,10 +166,13 @@ stdenv.mkDerivation ( # and it's definition at: pkgs/development/lua-modules/overrides.nix lua.pkgs.libluv neovimLuaEnv - tree-sitter + treeSitterForNeovim unibilium utf8proc ] + ++ lib.optionals wasmSupport [ + wasmtime_36 + ] ++ lib.optionals (stdenv.hostPlatform.libc != "glibc") [ # Provide libintl for non-glibc platforms gettext @@ -202,13 +210,20 @@ stdenv.mkDerivation ( pyEnv # for src/clint.py ]; - # nvim --version output retains compilation flags and references to build tools - postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - sed -i runtime/CMakeLists.txt \ - -e "s|\".*/bin/nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g" - sed -i src/nvim/po/CMakeLists.txt \ - -e "s|\$