2022-05-06 22:50:19 +02:00
|
|
|
{ pkgs, lib, nodejs, stdenv}:
|
2020-05-29 18:22:23 +02:00
|
|
|
|
|
|
|
let
|
2022-05-06 22:50:19 +02:00
|
|
|
inherit (lib) composeManyExtensions extends makeExtensible mapAttrs;
|
|
|
|
|
|
|
|
nodePackages = final: import ./composition.nix {
|
2020-05-29 18:22:23 +02:00
|
|
|
inherit pkgs nodejs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
};
|
2022-05-06 21:20:30 +02:00
|
|
|
|
2022-05-06 22:50:19 +02: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)
|