@andrewrk in your Nix expression it could be that by referencing the packages directly (pkgs.whatever) you’re only including the default outputs of the packages (out, bin, etc…it depends). The lib output is usually separate, so you’d need pkgs.whatever.lib.
Just a thought, haven’t looked any deeper since I’m not at a computer.