fix: use the right nixpkgs when consuming overlays

This commit is contained in:
Jake Hamilton 2022-09-09 01:41:20 -07:00
parent 13cd056669
commit 6ed0b9f668
No known key found for this signature in database
GPG key ID: 9762169A1B35EA68
4 changed files with 24 additions and 11 deletions

View file

@ -25,6 +25,7 @@ in
user-packages-overlay = final: prev:
let
user-packages = snowfall-lib.package.create-packages {
pkgs = prev;
channels = channels;
};
user-packages-without-default = builtins.removeAttrs
@ -32,6 +33,14 @@ in
in
if overlay-package-namespace == null then
user-packages-without-default
else if prev ? "${overlay-package-namespace}" then
{
${overlay-package-namespace} =
snowfall-lib.attrs.merge-deep [
prev.${overlay-package-namespace}
user-packages-without-default
];
}
else
{
${overlay-package-namespace} = user-packages-without-default;