Neovim-nightly and emacs-pgtk-nativecomp overlays

I was learning how to use cachix with github actions and am now maintaining two overlays: neovim-nightly and pure gtk emacs with native compilation. The latter, a pure gtk port of the emacs gui, is not available in the nix-community overlay, as the pure gtk port of emacs has not yet been merged upstream (and it also is based on a branch that merges pure gtk and native compilation feature branches). I provide binaries via cachix for neovim-nightly for both mac and linux, and binaries for emacs-pgtk-nativecomp for linux.


thanks for providing this. I never managed to share my neovim-master derivation like you did. Do you run niv update or a cronjob ? I find the repo a bit overwhelming for a change that can be done by just overriding the src with builtins.fetchGit; .
I plan to setup a job as part of neovim’s upstream tests, which may come in handy too.

The repo is a bit huge, most of that is overhead from cachix/CI/CD/github actions/niv.

The update of the repo is done via niv with a cronjob using a github action:

name: Update niv

    # every day at 8am UTC
    - cron: '0 8 * * *'

    runs-on: ubuntu-latest
    - uses: actions/checkout@v2.3.2
    - uses: cachix/install-nix-action@v10
    - run: nix-shell --run "niv update"
    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v3
        commit-message: "chore: update niv dependencies"
        title: "chore: update niv dependencies"
        branch: "chore/update-niv-dependencies"

This automatically makes a PR, which I merge (triggering the CI which builds for linux and macos and pushes to cachix).

The other source of overhead is I version nixpkgs itself in the overlay with niv,

  sources = import ./nix/sources.nix;
  nixpkgs = sources."nixpkgs-unstable";
  pkgs = import nixpkgs {};
_: _:
    neovim-nightly = pkgs.neovim-unwrapped.overrideAttrs (
      _: {
        version = "master";
        src = pkgs.fetchFromGitHub {
          inherit (sources.neovim) owner repo rev sha256;

There are two main reason I did this; I wanted to ensure that if you use the overlay, you are guaranteed not to have a nixpkgs-unstable hash mismatch and always hit my cachix cache. The second reason, is I wanted anyone who uses the overlay to be able to easily rollback to prior commits of neovim/nixpkgs, should there be a breaking change (which you don’t get when you replace the source with master) such as that which has happened surrounding lua/libluv.

The majority of the repository is taken straight from, but I’m happy to simplify or align with best practices!

Edit: Also, I think you helped me on IRC when I first started using nix and wanted to use neovim builds from master!