So I’m currently using an overlay to add an attr master-pkgs
to my nixpkgs to access things that have been merged to master but haven’t made it to unstable yet
that looks like this:
# flake.nix
...
inputs = {
...
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
};
outputs = { nixpkgs, nixpkgs-master, ... }: let
pkgs-master-overlay = self: super: {
master-pkgs = nixpkgs-master.legacyPackages.x86_64-linux;
};
in { ... }
which I can then use like pkgs.master-pkgs.vimPlugins.thing-that-just-got-merged
.
This is fine and dandy and good enough, but what I want is to create an overlay that will recursively add all attrs that exist in nixpkgs-master
but don’t exist in nixpkgs
, so that when I’m specifying a package, I can simply type pkgs.vimPlugins.thing-that-just-got-merged
rather than the pkgs.master-pkgs
version.
I’ve been playing around with this for the last couple of hours but just cant get it right.
If anyone is already doing this or similar, would you mind sharing your config?
If not, is there any obvious way you can think to accomplish it? Perhaps specific library functions I’ve missed that could be helpful. I’ve played around with what feels like most of the functions in lib.attrsets
with no clear path forward.
Thanks