From cf8a0cebb166d1cdab36292d43ddd27b1ab4888d Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Thu, 16 May 2024 12:57:25 -0500 Subject: [PATCH] Use neovim projects flake --- nix/base-system/flake.lock | 138 ++++++++++++++++++++++++++++--------- nix/base-system/flake.nix | 18 ++++- 2 files changed, 121 insertions(+), 35 deletions(-) diff --git a/nix/base-system/flake.lock b/nix/base-system/flake.lock index 7cbeec3..eac854b 100644 --- a/nix/base-system/flake.lock +++ b/nix/base-system/flake.lock @@ -217,6 +217,24 @@ "inputs": { "systems": "systems_3" }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1687709756, "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", @@ -231,7 +249,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", @@ -246,9 +264,9 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_7": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1705309234, @@ -264,9 +282,9 @@ "type": "github" } }, - "flake-utils_7": { + "flake-utils_8": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -417,7 +435,7 @@ }, "naersk_3": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1650101877, @@ -433,10 +451,32 @@ "type": "github" } }, - "nil-flake": { + "neovim-flake": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "dir": "contrib", + "lastModified": 1715862872, + "narHash": "sha256-FCOipXHkAbkuFw9JjEpOIJ8BkyMkjkI0Dp+SzZ4yZlw=", + "owner": "neovim", + "repo": "neovim", + "rev": "27fb62988e922c2739035f477f93cc052a4fee1e", + "type": "github" + }, + "original": { + "dir": "contrib", + "owner": "neovim", + "ref": "stable", + "repo": "neovim", + "type": "github" + } + }, + "nil-flake": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -485,6 +525,22 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1682109806, + "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2362848adf8def2866fabbffc50462e929d7fffb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1678724065, @@ -528,6 +584,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1715787315, + "narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1690441914, "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", @@ -543,7 +615,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1701282334, "narHash": "sha256-MxCVrXY6v4QmfTwIysjjaX0XUhqBbxTWWB4HXtDYsdk=", @@ -559,7 +631,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1689850295, "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", @@ -575,7 +647,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1650109093, "narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=", @@ -589,25 +661,9 @@ "type": "indirect" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1682109806, - "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2362848adf8def2866fabbffc50462e929d7fffb", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nurl-flake": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1701273941, @@ -631,8 +687,9 @@ "durnitisp-flake": "durnitisp-flake", "harpoon-src": "harpoon-src", "heracles-flake": "heracles-flake", + "neovim-flake": "neovim-flake", "nil-flake": "nil-flake", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-darwin": "nixpkgs-darwin", "nurl-flake": "nurl-flake", "roslyn-lsp": "roslyn-lsp", @@ -663,7 +720,7 @@ "runwhen-flake": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "naersk": "naersk_3" }, "locked": { @@ -705,7 +762,7 @@ }, "rust-overlay-flake": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "nixpkgs": [ "nixpkgs" ] @@ -752,10 +809,10 @@ "sile-flake": { "inputs": { "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_7", + "flake-utils": "flake-utils_8", "gitignore": "gitignore", "libtexpdf-src": "libtexpdf-src", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1694595810, @@ -846,6 +903,21 @@ "type": "github" } }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treesitter-context": { "flake": false, "locked": { diff --git a/nix/base-system/flake.nix b/nix/base-system/flake.nix index 06397ba..119fbef 100644 --- a/nix/base-system/flake.nix +++ b/nix/base-system/flake.nix @@ -25,6 +25,13 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; + + neovim-flake = { + url = "github:neovim/neovim/stable?dir=contrib"; + # NOTE(jeremy): Currently this needs a newer nixpkgs version + #inputs.nixpkgs.follows = "nixpkgs"; + }; + harpoon-src = { url = "github:ThePrimeagen/harpoon/harpoon2"; flake = false; @@ -62,6 +69,7 @@ #lean4-flake, unstable, heracles-flake, + neovim-flake, ... # We don't use the self or nixpkgs args here so we just glob it. }: rec { @@ -91,6 +99,7 @@ name = "roslyn-nvim"; src = roslyn-lsp; }; + nvim = neovim-flake.packages."${system}".neovim; # TODO(jwall): When this actually builds we should use it. #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { # inherit (pkgs.tree-sitter) buildGrammar; @@ -106,12 +115,17 @@ PAGER="less -R"; OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp"; }; - + + nixpkgs.overlays = [ + (final: prev: { + custom-neovim = nvim; + }) + ]; programs = with pkgs; { neovim.enable = true; neovim.vimAlias = true; neovim.viAlias = true; - neovim.package = pkgs.neovim-unwrapped; + neovim.package = pkgs.custom-neovim; neovim.configure = { customRC = "lua << EOF ${builtins.readFile ./init.lua}