diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/neovim/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/neovim/default.nix | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/applications/editors/neovim/default.nix b/nixpkgs/pkgs/applications/editors/neovim/default.nix index 60035e3f1b58..aa5b007c4d1b 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/default.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/default.nix @@ -12,11 +12,10 @@ # now defaults to false because some tests can be flaky (clipboard etc), see # also: https://github.com/neovim/neovim/issues/16233 -, doCheck ? false , nodejs ? null, fish ? null, python3 ? null }: - -let +stdenv.mkDerivation (finalAttrs: + let nvim-lpeg-dylib = luapkgs: if stdenv.isDarwin then (luapkgs.lpeg.overrideAttrs (oa: { preConfigure = '' @@ -42,7 +41,7 @@ let (nvim-lpeg-dylib ps) luabitop mpack - ] ++ lib.optionals doCheck [ + ] ++ lib.optionals finalAttrs.doCheck [ luv coxpcall busted @@ -64,17 +63,17 @@ let in deterministicLuajit.withPackages(ps: [ ps.mpack (nvim-lpeg-dylib ps) ]) else lua.luaOnBuild; - pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]); -in - stdenv.mkDerivation rec { +in { pname = "neovim-unwrapped"; version = "0.9.5"; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "neovim"; repo = "neovim"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-CcaBqA0yFCffNPmXOJTo8c9v1jrEBiqAl8CG5Dj5YxE="; }; @@ -87,7 +86,7 @@ in dontFixCmake = true; - inherit lua; + inherit lua treesitter-parsers; buildInputs = [ gperf @@ -105,15 +104,17 @@ in tree-sitter unibilium ] ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ] - ++ lib.optionals doCheck [ glibcLocales procps ] + ++ lib.optionals finalAttrs.doCheck [ glibcLocales procps ] ; - inherit doCheck; + doCheck = false; # to be exhaustive, one could run # make oldtests too checkPhase = '' + runHook preCheck make functionaltest + runHook postCheck ''; nativeBuildInputs = [ @@ -123,7 +124,9 @@ in ]; # extra programs test via `make functionaltest` - nativeCheckInputs = [ + nativeCheckInputs = let + pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]); + in [ fish nodejs pyEnv # for src/clint.py @@ -166,11 +169,11 @@ in ln -s \ ${tree-sitter.buildGrammar { inherit language src; - version = "neovim-${version}"; + version = "neovim-${finalAttrs.version}"; }}/parser \ $out/lib/nvim/parser/${language}.so '') - treesitter-parsers); + finalAttrs.treesitter-parsers); shellHook='' export VIMRUNTIME=$PWD/runtime @@ -199,4 +202,4 @@ in maintainers = with maintainers; [ manveru rvolosatovs ]; platforms = platforms.unix; }; - } + }) |