🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

flake: vendor neovim-nightly-overlay

robin 6b56989f 24438536

+132 -58
+5 -1
default.nix
··· 14 14 }: 15 15 let 16 16 packages = lib.makeScope pkgs.newScope (self: { 17 - ivy = self.callPackage ./pkgs/ivy/package.nix { inherit ivyVersion; }; 17 + neovim = self.callPackage ./pkgs/neovim/package.nix { inherit (inputs) neovim-src; }; 18 + ivy = self.callPackage ./pkgs/ivy/package.nix { 19 + inherit ivyVersion; 20 + neovim-unwrapped = self.neovim; 21 + }; 18 22 ivyPlugins = self.callPackage ./pkgs/ivy-plugins/package.nix { }; 19 23 inherit (inputs.gift-wrap.legacyPackages.${pkgs.stdenv.hostPlatform.system}) wrapNeovim; 20 24 });
-46
flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "flake-parts": { 4 - "inputs": { 5 - "nixpkgs-lib": [ 6 - "neovim-nightly-overlay", 7 - "nixpkgs" 8 - ] 9 - }, 10 - "locked": { 11 - "lastModified": 1772408722, 12 - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", 13 - "owner": "hercules-ci", 14 - "repo": "flake-parts", 15 - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", 16 - "type": "github" 17 - }, 18 - "original": { 19 - "owner": "hercules-ci", 20 - "repo": "flake-parts", 21 - "type": "github" 22 - } 23 - }, 24 3 "gift-wrap": { 25 4 "inputs": { 26 5 "nixpkgs": [ ··· 41 20 "type": "github" 42 21 } 43 22 }, 44 - "neovim-nightly-overlay": { 45 - "inputs": { 46 - "flake-parts": "flake-parts", 47 - "neovim-src": [ 48 - "neovim-src" 49 - ], 50 - "nixpkgs": [ 51 - "nixpkgs" 52 - ] 53 - }, 54 - "locked": { 55 - "lastModified": 1773705884, 56 - "narHash": "sha256-2atzXVl7CB+46HcuFRe3cUleEJdn2KoUdVOPQHyZBpg=", 57 - "owner": "nix-community", 58 - "repo": "neovim-nightly-overlay", 59 - "rev": "3c143994a616ebc45c69dfa0487e171b7b5c0da6", 60 - "type": "github" 61 - }, 62 - "original": { 63 - "owner": "nix-community", 64 - "repo": "neovim-nightly-overlay", 65 - "type": "github" 66 - } 67 - }, 68 23 "neovim-src": { 69 24 "flake": false, 70 25 "locked": { ··· 97 52 "root": { 98 53 "inputs": { 99 54 "gift-wrap": "gift-wrap", 100 - "neovim-nightly-overlay": "neovim-nightly-overlay", 101 55 "neovim-src": "neovim-src", 102 56 "nixpkgs": "nixpkgs" 103 57 }
-10
flake.nix
··· 9 9 inputs.nixpkgs.follows = "nixpkgs"; 10 10 }; 11 11 12 - neovim-nightly-overlay = { 13 - url = "github:nix-community/neovim-nightly-overlay"; 14 - inputs = { 15 - nixpkgs.follows = "nixpkgs"; 16 - neovim-src.follows = "neovim-src"; 17 - }; 18 - }; 19 - 20 12 neovim-src = { 21 13 url = "github:neovim/neovim"; 22 14 flake = false; ··· 27 19 inputs@{ 28 20 self, 29 21 nixpkgs, 30 - neovim-nightly-overlay, 31 22 ... 32 23 }: 33 24 let ··· 41 32 import nixpkgs { 42 33 inherit system; 43 34 config.allowUnfree = true; 44 - overlays = [ neovim-nightly-overlay.overlays.default ]; 45 35 } 46 36 ) 47 37 );
+1 -1
modules/home-manager.nix
··· 41 41 programs.ivy = { 42 42 package = pkgs'.ivy.override { 43 43 inherit (cfg) includePerLanguageTooling; 44 - basePackage = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.neovim; 44 + basePackage = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.neovim; 45 45 }; 46 46 47 47 gui.package = pkgs.symlinkJoin {
+27
pkgs/neovim/dependencies.nix
··· 1 + { 2 + lib, 3 + fetchurl, 4 + neovim-src, 5 + ... 6 + }: 7 + lib.pipe "${neovim-src}/cmake.deps/deps.txt" [ 8 + builtins.readFile 9 + (lib.splitString "\n") 10 + (map (builtins.match "([A-Z0-9_]+)_(URL|SHA256)[[:space:]]+([^[:space:]]+)[[:space:]]*")) 11 + (lib.remove null) 12 + (lib.flip builtins.foldl' { } ( 13 + acc: matches: 14 + let 15 + name = lib.toLower (builtins.elemAt matches 0); 16 + key = lib.toLower (builtins.elemAt matches 1); 17 + value = lib.toLower (builtins.elemAt matches 2); 18 + in 19 + acc 20 + // { 21 + ${name} = acc.${name} or { } // { 22 + ${key} = value; 23 + }; 24 + } 25 + )) 26 + (builtins.mapAttrs (lib.const fetchurl)) 27 + ]
+62
pkgs/neovim/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + callPackage, 5 + neovim-src, 6 + 7 + libuv, 8 + gettext, 9 + 10 + neovim-unwrapped, 11 + baseNeovimUnwrapped ? neovim-unwrapped, 12 + ... 13 + }: 14 + let 15 + src = neovim-src; 16 + 17 + tree-sitter = callPackage ./tree-sitter-bundled.nix { 18 + inherit dependencies; 19 + }; 20 + 21 + dependencies = callPackage ./dependencies.nix { 22 + inherit neovim-src; 23 + }; 24 + 25 + # The following overrides will only take effect for linux hosts 26 + linuxOnlyOverrides = lib.optionalAttrs stdenv.isLinux { 27 + gettext = gettext.overrideAttrs { 28 + # FIXME: nixpkgs' gettext is now at version 0.22.5 whereas neovim's is pinned at 0.20.5 29 + # Overriding the source leads to a build error of gettext. 30 + # Neovim seems to build fine with nixpkgs' gettext, so we use that in the meantime. 31 + # src = dependencies.gettext; 32 + }; 33 + }; 34 + 35 + overrides = { 36 + libuv = libuv.overrideAttrs { 37 + # FIXME: overriding libuv casues high CPU usage on darwin 38 + # https://github.com/nix-community/neovim-nightly-overlay/issues/538 39 + # src = dependencies.libuv; 40 + }; 41 + inherit tree-sitter; 42 + 43 + treesitter-parsers = 44 + let 45 + grammars = lib.filterAttrs (name: _: lib.hasPrefix "treesitter_" name) dependencies; 46 + in 47 + lib.mapAttrs' ( 48 + name: value: lib.nameValuePair (lib.removePrefix "treesitter_" name) { src = value; } 49 + ) grammars; 50 + } 51 + // linuxOnlyOverrides; 52 + in 53 + (baseNeovimUnwrapped.override overrides).overrideAttrs (oa: { 54 + version = "${neovim-src.shortRev or "dirty"}"; 55 + inherit src; 56 + 57 + preConfigure = '' 58 + ${oa.preConfigure} 59 + substituteInPlace cmake.config/versiondef.h.in \ 60 + --replace-fail '@NVIM_VERSION_PRERELEASE@' '-nightly+${neovim-src.shortRev or "dirty"}' 61 + ''; 62 + })
+37
pkgs/neovim/tree-sitter-bundled.nix
··· 1 + { 2 + lib, 3 + tree-sitter, 4 + clang, 5 + libclang, 6 + rustPlatform, 7 + dependencies, 8 + }: 9 + let 10 + cargoHash = "sha256-zh6KsnZ7s6VXGCggoYbLGeGnEZ7g7anjkz8C5/L4yXQ="; 11 + in 12 + tree-sitter.overrideAttrs (oa: { 13 + src = dependencies.treesitter; 14 + version = "bundled"; 15 + inherit cargoHash; 16 + cargoDeps = rustPlatform.fetchCargoVendor { 17 + name = "${oa.pname}-cargo-deps"; 18 + src = dependencies.treesitter; 19 + hash = cargoHash; 20 + }; 21 + # Disable patches applied by the nixpkgs tree-sitter derivation as they clash with this revision of TS. 22 + # The equivalent patching is done below in `postPatch` 23 + patches = [ ]; 24 + 25 + # clang is needed by the quickjs-sys crate to compile quickjs 26 + nativeBuildInputs = [ 27 + clang 28 + ] 29 + ++ oa.nativeBuildInputs; 30 + env.LIBCLANG_PATH = "${lib.getLib libclang}/lib"; 31 + 32 + postPatch = '' 33 + ${oa.postPatch} 34 + sed -e 's/playground::serve(.*$/println!("ERROR: web-ui is not available in this nixpkgs build; enable the webUISupport"); std::process::exit(1);/' \ 35 + -i crates/cli/src/main.rs 36 + ''; 37 + })