2022-05-18 14:49:53 +00:00
|
|
|
{ pkgs, lib, nodejs, stdenv}:
|
2020-06-02 18:00:15 +00:00
|
|
|
|
|
|
|
let
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (lib) composeManyExtensions extends makeExtensible mapAttrs;
|
|
|
|
|
|
|
|
nodePackages = final: import ./composition.nix {
|
2020-06-02 18:00:15 +00:00
|
|
|
inherit pkgs nodejs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +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)
|