aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/flake.lock61
-rw-r--r--contrib/flake.nix165
-rw-r--r--contrib/local.mk.example7
3 files changed, 5 insertions, 228 deletions
diff --git a/contrib/flake.lock b/contrib/flake.lock
deleted file mode 100644
index 0259dd4c8c..0000000000
--- a/contrib/flake.lock
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "nodes": {
- "flake-utils": {
- "inputs": {
- "systems": "systems"
- },
- "locked": {
- "lastModified": 1701680307,
- "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "nixpkgs": {
- "locked": {
- "lastModified": 1703013332,
- "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "root": {
- "inputs": {
- "flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs"
- }
- },
- "systems": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
- }
- },
- "root": "root",
- "version": 7
-}
diff --git a/contrib/flake.nix b/contrib/flake.nix
deleted file mode 100644
index 6355f3a68a..0000000000
--- a/contrib/flake.nix
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- description = "Neovim flake";
-
- inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
- flake-utils.url = "github:numtide/flake-utils";
- };
-
- outputs = { self, nixpkgs, flake-utils }:
- let
- inherit (builtins)
- elemAt
- foldl'
- mapAttrs
- match
- readFile
- ;
- inherit (nixpkgs.lib)
- const
- flip
- pipe
- remove
- splitString
- toLower
- ;
- in
- {
- overlay = final: prev: {
-
- neovim = (final.neovim-unwrapped.override {
- treesitter-parsers = pipe ../cmake.deps/deps.txt [
- readFile
- (splitString "\n")
- (map (match "TREESITTER_([A-Z_]+)_(URL|SHA256)[[:space:]]+([^[:space:]]+)[[:space:]]*"))
- (remove null)
- (flip foldl' { }
- (acc: matches:
- let
- lang = toLower (elemAt matches 0);
- type = toLower (elemAt matches 1);
- value = elemAt matches 2;
- in
- acc // {
- ${lang} = acc.${lang} or { } // {
- ${type} = value;
- };
- }))
- (mapAttrs (const final.fetchurl))
- (self: self // {
- markdown = final.stdenv.mkDerivation {
- inherit (self.markdown) name;
- src = self.markdown;
- installPhase = ''
- mv tree-sitter-markdown $out
- '';
- };
- })
- ];
- }).overrideAttrs (oa: rec {
- version = self.shortRev or "dirty";
- src = ../.;
- preConfigure = oa.preConfigure or "" + ''
- sed -i cmake.config/versiondef.h.in -e 's/@NVIM_VERSION_PRERELEASE@/-dev-${version}/'
- '';
- nativeBuildInputs = oa.nativeBuildInputs ++ [
- final.libiconv
- ];
- });
-
- # a development binary to help debug issues
- neovim-debug = let
- stdenv = if final.stdenv.isLinux then
- final.llvmPackages_latest.stdenv
- else
- final.stdenv;
- in (final.neovim.override {
- lua = final.luajit;
- inherit stdenv;
- }).overrideAttrs (oa: {
-
- dontStrip = true;
- NIX_CFLAGS_COMPILE = " -ggdb -Og";
-
- cmakeBuildType = "Debug";
-
- disallowedReferences = [ ];
- });
-
- # for neovim developers, beware of the slow binary
- neovim-developer = let inherit (final.luaPackages) luacheck;
- in (final.neovim-debug.override {
- doCheck = final.stdenv.isLinux;
- }).overrideAttrs (oa: {
- cmakeFlags = oa.cmakeFlags ++ [
- "-DLUACHECK_PRG=${luacheck}/bin/luacheck"
- "-DENABLE_LTO=OFF"
- ] ++ final.lib.optionals final.stdenv.isLinux [
- # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
- # https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports
- "-DENABLE_ASAN_UBSAN=ON"
- ];
- });
- };
- } // flake-utils.lib.eachDefaultSystem (system:
- let
- pkgs = import nixpkgs {
- overlays = [ self.overlay ];
- inherit system;
- };
-
- lua = pkgs.lua5_1;
-
- pythonEnv = pkgs.python3.withPackages (ps: [
- ps.msgpack
- ]);
- in {
- packages = with pkgs; {
- default = neovim;
- inherit neovim neovim-debug neovim-developer;
- };
-
- checks = {
- shlint = pkgs.runCommand "shlint" {
- nativeBuildInputs = [ pkgs.shellcheck ];
- preferLocalBuild = true;
- } "make -C ${./..} shlint > $out";
- };
-
- # kept for backwards-compatibility
- defaultPackage = pkgs.neovim;
-
- devShells = {
- default = pkgs.neovim-developer.overrideAttrs (oa: {
-
- buildInputs = with pkgs;
- oa.buildInputs ++ [
- lua.pkgs.luacheck
- sumneko-lua-language-server
- pythonEnv
- include-what-you-use # for scripts/check-includes.py
- jq # jq for scripts/vim-patch.sh -r
- shellcheck # for `make shlint`
- ];
-
- nativeBuildInputs = with pkgs;
- oa.nativeBuildInputs ++ [
- clang-tools # for clangd to find the correct headers
- ];
-
- shellHook = oa.shellHook + ''
- export NVIM_PYTHON_LOG_LEVEL=DEBUG
- export NVIM_LOG_FILE=/tmp/nvim.log
- export ASAN_SYMBOLIZER_PATH=${pkgs.llvm_11}/bin/llvm-symbolizer
-
- # ASAN_OPTIONS=detect_leaks=1
- export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1"
-
- # for treesitter functionaltests
- mkdir -p runtime/parser
- cp -f ${pkgs.vimPlugins.nvim-treesitter.builtGrammars.c}/parser runtime/parser/c.so
- '';
- });
- };
- });
-}
diff --git a/contrib/local.mk.example b/contrib/local.mk.example
index 4e8a510f2d..58474a3750 100644
--- a/contrib/local.mk.example
+++ b/contrib/local.mk.example
@@ -42,13 +42,16 @@
# them.
#
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_BUSTED=OFF
-# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBTERMKEY=OFF
+# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_GETTEXT=OFF
+# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBICONV=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAJIT=OFF
+# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUV=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF
+# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_TS=OFF
+# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_TS_PARSERS=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF
-# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UTF8PROC=OFF
#
# Or disable all bundled dependencies at once.
#