From b75a0543ee42864c404b4824119b1500ef95f66d Mon Sep 17 00:00:00 2001 From: xeals Date: Sat, 17 Oct 2020 11:59:17 +1100 Subject: [PATCH] core: fix overlay to merge package sets --- overlay.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/overlay.nix b/overlay.nix index 122729d..c3aab71 100644 --- a/overlay.nix +++ b/overlay.nix @@ -10,9 +10,19 @@ let nameValuePair = n: v: { name = n; value = v; }; nurAttrs = import ./default.nix { pkgs = super; }; + overlay = + builtins.listToAttrs + (map (n: nameValuePair n nurAttrs.${n}) + (builtins.filter (n: !isReserved n) + (builtins.attrNames nurAttrs))); + in - builtins.listToAttrs - (map (n: nameValuePair n nurAttrs.${n}) - (builtins.filter (n: !isReserved n) - (builtins.attrNames nurAttrs))) +# Shadow existing package sets if they already exist rather than replacing. +overlay // +{ + goModules = (super.goModules or { }) // (overlay.goModules or { }); + jetbrains = (super.jetbrains or { }) // (overlay.jetbrains or { }); + python2Packages = (super.python2Packages or { }) // (overlay.python2Packages or { }); + python3Packages = (super.python3Packages or { }) // (overlay.python3Packages or { }); +}