2022-05-06 20:50:19 +00:00
|
|
|
{ pkgs, lib, nodejs, stdenv}:
|
2020-05-29 16:22:23 +00:00
|
|
|
|
|
|
|
let
|
2022-05-06 20:50:19 +00:00
|
|
|
inherit (lib) composeManyExtensions extends makeExtensible mapAttrs;
|
|
|
|
|
|
|
|
nodePackages = final: import ./composition.nix {
|
2020-05-29 16:22:23 +00:00
|
|
|
inherit pkgs nodejs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
};
|
2022-05-06 19:20:30 +00:00
|
|
|
|
2022-05-06 20:50:19 +00:00
|
|
|
mainProgramOverrides = final: prev:
|
|
|
|
mapAttrs (pkgName: mainProgram:
|
|
|
|
prev.${pkgName}.override (oldAttrs: {
|
|
|
|
meta = oldAttrs.meta // { inherit mainProgram; };
|
|
|
|
})
|
|
|
|
) (import ./main-programs.nix);
|
|
|
|
|
|
|
|
extensions = composeManyExtensions [
|
|
|
|
mainProgramOverrides
|
|
|
|
(import ./overrides.nix { inherit pkgs nodejs; })
|
|
|
|
];
|
|
|
|
in
|
|
|
|
makeExtensible (extends extensions nodePackages)
|