diff options
author | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2024-01-15 17:13:04 +0100 |
---|---|---|
committer | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2024-01-16 10:05:21 +0100 |
commit | c4be1f71a512cbb4bd68ef8da99025023048f6d3 (patch) | |
tree | f19c9b6cf9b76f0b5cd92540176eaaa1303c7cc3 /pkgs/applications/editors/neovim | |
parent | 4c8ce132ffda3af6c4d876bdbde83e2f550134ad (diff) | |
download | nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar.gz nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar.bz2 nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar.lz nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar.xz nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.tar.zst nixlib-c4be1f71a512cbb4bd68ef8da99025023048f6d3.zip |
neovim-unwrapped: use finalAttrs
finalAttrs is more discoverable via REPL, hence I - referenced doCheck via finalAttrs
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r-- | pkgs/applications/editors/neovim/default.nix | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix index 60035e3f1b58..82bb404fd24a 100644 --- a/pkgs/applications/editors/neovim/default.nix +++ b/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,15 @@ 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"; src = fetchFromGitHub { owner = "neovim"; repo = "neovim"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-CcaBqA0yFCffNPmXOJTo8c9v1jrEBiqAl8CG5Dj5YxE="; }; @@ -105,15 +102,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 +122,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,7 +167,7 @@ in ln -s \ ${tree-sitter.buildGrammar { inherit language src; - version = "neovim-${version}"; + version = "neovim-${finalAttrs.version}"; }}/parser \ $out/lib/nvim/parser/${language}.so '') @@ -199,4 +200,4 @@ in maintainers = with maintainers; [ manveru rvolosatovs ]; platforms = platforms.unix; }; - } + }) |