diff --git a/flake.lock b/flake.lock index 7f5cddb8..3760402e 100644 --- a/flake.lock +++ b/flake.lock @@ -55,6 +55,64 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -131,6 +189,28 @@ "type": "github" } }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704029560, + "narHash": "sha256-a4Iu7x1OP+uSYpqadOu8VCPY+MPF3+f6KIi+MAxlgyw=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "d5cbf433a6ae9cae05400189a8dbc6412a03ba16", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -155,16 +235,17 @@ "inputs": { "flake-utils": "flake-utils_3", "nixpkgs": [ + "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { "dir": "contrib", - "lastModified": 1706809932, - "narHash": "sha256-pgAne/DV7jleLUqHfozjLfIDFLiZSCsjY78d5x+lvPk=", + "lastModified": 1706140641, + "narHash": "sha256-H1qHhkf7sF7yrG2rb9Ks1Y4EtLY3cXGp16KCGveJWY4=", "owner": "neovim", "repo": "neovim", - "rev": "05fd70f19b39519985000141d022971e37d66189", + "rev": "4e59422e1d4950a3042bad41a7b81c8db4f8b648", "type": "github" }, "original": { @@ -174,6 +255,28 @@ "type": "github" } }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-flake": "neovim-flake", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1706141075, + "narHash": "sha256-o66/XFTXmcJSpEcO508V5r765HtgT8qtr+H4LRIB9BY=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "1da2e054a16309d7d7f7669438c8b9a5ef1b4642", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1689261696, @@ -207,6 +310,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1706006310, + "narHash": "sha256-nDPz0fj0IFcDhSTlXBU2aixcnGs2Jm4Zcuoj0QtmiXQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b43bb235efeab5324c5e486882ef46749188eee2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1706550542, "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", @@ -248,8 +367,8 @@ "inputs": { "arkenfox": "arkenfox", "home-manager": "home-manager", - "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs_2" + "neovim-nightly-overlay": "neovim-nightly-overlay", + "nixpkgs": "nixpkgs_3" } }, "systems": { diff --git a/flake.nix b/flake.nix index 50476aeb..f48d2bbd 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,11 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - neovim-flake = { - url = "github:neovim/neovim?dir=contrib"; - inputs.nixpkgs.follows = "nixpkgs"; - }; arkenfox = { url = "github:dwarfmaster/arkenfox-nixos"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home-manager/home.nix b/home-manager/home.nix index 81f75072..ca206802 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -10,6 +10,7 @@ in { inherit inputs; inherit pkgs; })) + inputs.neovim-nightly-overlay.overlay ]; home = { username = "mat"; diff --git a/home-manager/server.nix b/home-manager/server.nix index 1ebfad48..2d1245f0 100644 --- a/home-manager/server.nix +++ b/home-manager/server.nix @@ -5,6 +5,7 @@ inherit inputs; inherit pkgs; })) + inputs.neovim-nightly-overlay.overlay ]; home = { username = "mat"; diff --git a/packages/default.nix b/packages/default.nix index 8d829d82..f44bceb0 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,12 +1 @@ -{ inputs, pkgs, ... }: -let - inherit (pkgs) stdenv; - inherit (stdenv) isLinux; - inherit (inputs.neovim-flake) packages; - neovim = if isLinux then - packages.x86_64-linux.neovim - else - packages.aarch64-darwin.neovim; -in { - neovim-nightly = pkgs.callPackage ./neovim-nightly.nix { inherit neovim; }; -} +{ inputs, pkgs, ... }: { } diff --git a/packages/libvterm-neovim.nix b/packages/libvterm-neovim.nix deleted file mode 100644 index 65b4b6f8..00000000 --- a/packages/libvterm-neovim.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ libvterm-neovim, fetchurl }: -let libvterm-neovim-version = "0.3.3"; -in libvterm-neovim.overrideAttrs (o: { - version = libvterm-neovim-version; - src = fetchurl { - url = - "https://github.com/neovim/libvterm/archive/refs/tags/v${libvterm-neovim-version}.tar.gz"; - sha256 = "sha256-C6vjq0LDVJJdre3pDTUvBUqpxK5oQuqAOiDJdB4XLlY="; - }; -}) diff --git a/packages/neovim-nightly.nix b/packages/neovim-nightly.nix deleted file mode 100644 index 4d68490c..00000000 --- a/packages/neovim-nightly.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ neovim, pkgs, lib, ... }: -let - inherit (pkgs.stdenv.hostPlatform) isDarwin; - liblpeg = pkgs.stdenv.mkDerivation { - pname = "liblpeg"; - inherit (pkgs.luajitPackages.lpeg) version meta src; - - buildInputs = [ pkgs.luajit ]; - - buildPhase = '' - sed -i makefile -e "s/CC = gcc/CC = clang/" - sed -i makefile -e "s/-bundle/-dynamiclib/" - make macosx - ''; - - installPhase = '' - mkdir -p $out/lib - mv lpeg.so $out/lib/lpeg.dylib - ''; - - nativeBuildInputs = [ pkgs.fixDarwinDylibNames ]; - }; -in neovim.overrideAttrs (o: { - # custom patch required for bulding on macOS - # see: https://github.com/nix-community/neovim-nightly-overlay/issues/176 - # see: https://github.com/hurricanehrndz/nixcfg/commit/69e37b6ef878ddba8a8af1bd514f967879ea0082 - patches = builtins.filter (p: - (if builtins.typeOf p == "set" then baseNameOf p.name else baseNameOf) - != "use-the-correct-replacement-args-for-gsub-directive.patch") o.patches; - nativeBuildInputs = o.nativeBuildInputs ++ lib.optionals isDarwin [ liblpeg ]; - # Neovim GitHub org has a mirror of libvterm that tags releases before they're - # available upstream; use Neovim's libvterm mirror. - buildInputs = lib.lists.remove pkgs.libvterm-neovim o.buildInputs ++ [ - (pkgs.callPackage ./libvterm-neovim.nix { inherit (pkgs) libvterm-neovim; }) - ]; -})