Commit Graph

405 Commits

Author SHA1 Message Date
Matthieu C.
2f4291af95 neovim: expose vimPackage
it is relatively cumbersome to generate the vim package from the list of plugins so expose it so users can generate their own packpathdirs for an unwrapped neovim. I've tested this change with an upcoming home-manager change that makes neovim configuration more standard in the home-manager context
2024-10-15 14:08:10 +02:00
Matthieu C.
d2d9d9f005 neovim.tests: add a test for passthru.initRc 2024-10-13 15:37:56 +02:00
Matthieu C.
12dafac23c neovim: make the wrapper more evolvable
Now that we have structured attributes enabled, it's easier than ever to
access the wrapper config from itself. Let's expose the 'plugins'
derivations instead of the final 'packpathDir' with which one can't do much.

TLDR: the neovim wrapper accepts a list of neovim derivations in
`plugins` instead of the symlinkJoin of plugins in `packpathDir`.

With exposed plugins, one could tweak the current wrapper with more
plugins, e.g. neovim.withPlugins([fugitive]).withPlugins([plenary]) .
we could also add a boolean to autoadd the plugins passthru.initLua,
better handle the dependencies (runtime programs, python deps).
2024-10-13 15:37:56 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Matthieu Coudron
eae2c94383
fix neovim tests (#343769) 2024-09-23 09:56:20 +02:00
Matthieu C.
0fc790f4cc neovim.tests: minor improvements
- factorize the export HOME in runTest
- adjust suffix for nvim-with-luasnip (it was misleading)
- make 'checkAliases' check for executable bit as well
- expose nmt because it's more convenient to find its store path
2024-09-23 01:11:56 +02:00
Matthieu Coudron
423788f5b8
buildNeovimPlugin: pass a derivation to luaAttr (#343564)
* buildNeovimPlugin: pass a derivation to luaAttr
and deprecate passing a string.
Passing a string is not a typical/good nixpkgs habit. We want to give more control on
which attribute to wrap, without having to add it to the lua package set
necessarily.

* vimPlugins: update plugin with new syntax
buildNeovimPlugin now accepts derivations instead of the lua package name. This PR reflects the change
2024-09-22 20:01:56 +02:00
Matthieu C.
e9e4cd9391 neovim.tests.can_require_transitive_deps: fix running
it would hang without ever exiting neovim
2024-09-22 19:23:32 +02:00
Matthieu C.
1136ea8187 neovim.tests.nvim_with_ftplugin: fix the test
my previous "fix" broke the test, this restores it.
2024-09-22 19:15:42 +02:00
Peder Bergebakken Sundt
8c8c27bb19 treewide: remove unused inputs 2024-09-18 01:00:07 +02:00
Philip Taron
ae92f312bf
treewide: use a consistent meta.priority default 2024-08-29 09:04:57 -07:00
éclairevoyant
56a428d5fb
wrapNeovimUnstable: fix meta.position 2024-08-11 22:35:13 -04:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Gerg-L
d51dad7c77 neovim: stop inheriting meta.position from neovim-unwrapped 2024-07-22 15:01:34 +02:00
Aleksana
d582f13e5e
treewide: switch to cargoHash (#327127)
* nickel: switch to cargoHash

* gnvim-unwrapped: switch to cargoHash

* surrealdb-migrations: switch to cargoHash

* wluma: switch to cargoHash

* httm: switch to cargoHash

No need (observed) for these packages to have a vendor Cargo.lock. If they for some reason have to use a different Cargo.lock than upstream, they should copy that to the build directory as well, otherwise the build will fail. They don't, so I infer there's no reason to use Cargo.lock.
2024-07-15 22:55:51 +03:00
Martin Weinelt
9b79a05ae1
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/flexcache/default.nix
- pkgs/development/python-modules/flexparser/default.nix
- pkgs/development/python-modules/odp-amsterdam/default.nix
- pkgs/development/python-modules/pint/default.nix
- pkgs/development/python-modules/uncertainties/default.nix
- pkgs/top-level/python-packages.nix
2024-07-01 01:07:21 +02:00
Mango The Fourth
51e69413cf
neovimUtils.grammarToPlugin: also move the queries (#321550)
This installs queries from source into the neovim expected folder.

Some grammar queries are already in a folder like expected by neovim but others (notably the treesitter official ones) are not so the code deals with both. 
For instance the koka grammar puts its queries directly in "queries" folder https://github.com/mtoohey31/tree-sitter-koka/tree/main/queries
but some others puts it in a folder expected by neovim like https://github.com/tjdevries/tree-sitter-lua/tree/master/queries/lua .
2024-06-30 19:17:04 +02:00
Matthieu C.
443f4807e8 neovim-gtk: move to pkgs/by-name 2024-06-30 00:40:08 +02:00
Matthieu C.
e486522723 neovim-remote: move to pkgs/by-name 2024-06-30 00:35:05 +02:00
Martin Weinelt
f822b2ba5c Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/development/python-modules/langsmith/default.nix
- pkgs/development/python-modules/rich-pixels/default.nix
- pkgs/servers/teleport/generic.nix
2024-06-18 20:16:19 +02:00
Matthieu Coudron
9b23334289
neovim-qt: move to pkgs/by-name
* neovim-qt: move to pkgs/by-name
2024-06-18 10:40:23 +02:00
Matthieu C.
7e1ae5e8bb neovim: wrap LUA_PATH and LUA_CPATH
As described in https://github.com/NixOS/nixpkgs/issues/318925, lua
neovim plugin dependencies are not visible from neovim.

This calls the lua hook on the neovim packpack dir with the plugins.
The hook scans the propagated-build-input files (generated via
neovimUtils.packDir) and adds them to LUA_PATH / LUA_CPATH when
necessary.

We then wrap neovim with these values LUA_PATH prefixed with those
values
2024-06-12 15:26:44 +02:00
Matthieu C.
390ca00b5b neovimUtils.packDir: init: extend vimUtils.packDir
in order for neovim to catch plugins dependencies, we fork
vimUtils.packDir as `neovimUtils.packDir` to merge the various plugins
nix-support/propagated-build-inputs files in the packDir derivation
$out/nix-support/propagated-build-inputs where there was previously
none.

Having a fork allows us to experiment without impacting vim plugins.

Once we are more confident this doesn't break stuff and/or the
implementation is final, we can merge the fork back or replace one by
the other.
2024-06-12 15:07:06 +02:00
Matthieu C.
6fe1fd5421 neovim.tests: test lua transitive deps are available
As reported in several issues, lua plugin dependencies are not visible
from neovim. This adds a test to make sure nvim can see jsregexp when luasnip is part of the wrapper
see https://github.com/NixOS/nixpkgs/issues/306367 or https://github.com/NixOS/nixpkgs/issues/318925
for details
2024-06-12 14:11:31 +02:00
Matthieu C.
ceed006199 neovim: remove warning about --replace
by using --replace-warn
2024-06-11 00:06:06 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
isabel
63aceac766 treewide: remove unused occurence of fetchFromGitHub argument 2024-05-30 05:56:07 +00:00
Matthieu C.
c2149a80d2 neovide: moved to pkgs/by-name 2024-05-04 15:25:23 +02:00
Matthieu C.
32d21ca630 neovim-unwrapped: move to pkgs/by name 2024-05-04 14:24:41 +02:00
PerchunPak
2b32fd65a3 neovimUtils.grammarToPlugin: remove vimplugin prefix
See https://github.com/NixOS/nixpkgs/pull/303200.
2024-05-01 14:35:38 +02:00
Elliot Cameron
be137fd0d0 neovim: propagate pname and version through wrapper 2024-04-22 10:46:27 +02:00
éclairevoyant
2f71bd6e73
Merge pull request #305340 from MultisampledNight/rm-multisn8-neovide
neovide: remove multisn8 from maintainers
2024-04-19 16:06:59 +00:00
MultisampledNight
02c9aec57a
neovide: remove multisn8 from maintainers
I don't feel comfortable anymore with updating and maintaining the neovide
package, or more to say being generally-trusted to do so.
2024-04-19 17:53:31 +02:00
Mario Rodas
28e51c9d10
Merge pull request #258705 from tie/fix-ca-derivations-disallowed
{ruby,neovim}: fix build with content-addressed derivations

Fixes https://github.com/NixOS/nixpkgs/issues/278334
2024-03-24 09:00:12 -05:00
Martin Weinelt
3321e63b12
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
2024-03-19 04:00:32 +01:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again

This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)

### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix  does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.

### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx

### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override

https://github.com/NixOS/nixpkgs/pull/292043
2024-03-11 03:53:37 -07:00
Gaétan Lepage
63e129f793
buildNeovimPlugin: set version accordingly to the manual guidelines (#289008)
https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-naming
2024-02-25 18:15:04 +01:00
Matthieu Coudron
000b7bfd47
buildLuarocksPackage: ability to self reference extraConfig (#288253)
makes overrideAttrs for lua packages even more powerful.
As a consequence, it simplifies the implementation of buildNeovimPlugin.
2024-02-12 18:11:24 +01:00
Matthieu Coudron
bd6def34e2
neovimUtils.buildNeovimPlugin: use version from derivation if missing (#288251)
Trying to use:
`plugin = pkgs.neovimUtils.buildNeovimPlugin { luaAttr = "rocks-nvim"; };`

fails with:

```
error: attribute 'version' missing

at /nix/store/0ww4wsg5q5hmnzv06a0k1q32jc49y7gi-source/pkgs/applications/editors/neovim/build-neovim-plugin.nix:28:19:

    27|         })).overrideAttrs (drv: {
    28|         version = attrs.version;
	|                   ^
    29|         rockspecVersion = drv.rockspecVersion;
```

This PR fixes it.
2024-02-12 11:15:54 +01:00
R. Ryantm
7ba3caea70 neovide: 0.12.1 -> 0.12.2 2024-01-29 18:11:20 +01:00
github-actions[bot]
8c2ba7797a
Merge master into staging-next 2024-01-25 12:01:19 +00:00
John Chadwick
a55b396e05 neovim: also unset PYTHONSAFEPATH in python wrapper 2024-01-22 23:58:49 -05:00
Matthieu Coudron
cbb7b09bad neovim-unwrapped: enable structuredAttrs
To make treesitter-parsers referencable via finalAttrs, making it easier to modify/explore via repl
2024-01-16 10:05:21 +01:00
Matthieu Coudron
c4be1f71a5 neovim-unwrapped: use finalAttrs
finalAttrs is more discoverable via REPL, hence I
- referenced doCheck via finalAttrs
2024-01-16 10:05:21 +01:00
Nathan Henrie
e2bb36a115 neovide: fix build for aarch64-darwin
Thanks to @wegank for https://github.com/NixOS/nixpkgs/pull/274839/files

This also reenables checks, which pass once given access to neovim.
2024-01-07 05:24:58 -07:00
MultisampledNight
834794c97e
neovide: 0.12.0 -> 0.12.1 2024-01-05 01:56:15 +01:00
Gaetan Lepage
96496184b1 neovim: 0.9.4 -> 0.9.5
Changelog: https://github.com/neovim/neovim/releases/tag/v0.9.5
2023-12-30 15:39:00 +01:00
Matthieu Coudron
022cbac13d neovim: make generated wrapper args overridable
especially useful in home-manager to remove the generated options
2023-12-27 23:01:38 +01:00
Lucas Hoffmann
1ada32da4b
neovim: generate init.lua by default (#222907)
* wrapNeovimUnstable: generate lua rc files by default

backwards compatible. The viml source is source from init.lua 

---------

Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
2023-12-27 20:38:59 +01:00