a7848c7476
GitOrigin-RevId: 34ad3ffe08adfca17fcb4e4a47bb5f3b113687be
29 lines
733 B
Nix
29 lines
733 B
Nix
# inspired by pkgs/development/haskell-modules/default.nix
|
|
{ pkgs, lib
|
|
, lua
|
|
, overrides ? (final: prev: {})
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (lib) extends;
|
|
|
|
initialPackages = (pkgs.callPackage ../../top-level/lua-packages.nix {
|
|
inherit lua;
|
|
});
|
|
|
|
overridenPackages = import ./overrides.nix { inherit pkgs; };
|
|
|
|
generatedPackages = if (builtins.pathExists ./generated-packages.nix) then
|
|
(final: prev: pkgs.callPackage ./generated-packages.nix { inherit (final) callPackage; } final prev) else (final: prev: {});
|
|
|
|
extensible-self = lib.makeExtensible
|
|
(extends overrides
|
|
(extends overridenPackages
|
|
(extends generatedPackages
|
|
initialPackages
|
|
)
|
|
)
|
|
);
|
|
in
|
|
extensible-self
|