2020-04-24 23:36:52 +00:00
|
|
|
# inspired by pkgs/development/haskell-modules/default.nix
|
|
|
|
{ pkgs, lib
|
|
|
|
, lua
|
2021-09-18 10:52:07 +00:00
|
|
|
, overrides ? (final: prev: {})
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
2021-09-18 10:52:07 +00:00
|
|
|
pkgs.callPackage ./generated-packages.nix { } else (final: prev: {});
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
extensible-self = lib.makeExtensible
|
|
|
|
(extends overrides
|
|
|
|
(extends overridenPackages
|
|
|
|
(extends generatedPackages
|
|
|
|
initialPackages
|
|
|
|
)
|
|
|
|
)
|
2021-09-18 10:52:07 +00:00
|
|
|
);
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
extensible-self
|