2019-01-30 17:13:15 +03:00
|
|
|
# inspired by pkgs/development/haskell-modules/default.nix
|
2019-06-16 22:59:06 +03:00
|
|
|
{ pkgs, lib
|
2019-01-30 17:13:15 +03:00
|
|
|
, lua
|
2021-09-12 01:01:49 +03:00
|
|
|
, overrides ? (final: prev: {})
|
2019-01-30 17:13:15 +03:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2019-02-04 14:30:58 +03:00
|
|
|
inherit (lib) extends;
|
2019-01-30 17:13:15 +03:00
|
|
|
|
|
|
|
initialPackages = (pkgs.callPackage ../../top-level/lua-packages.nix {
|
|
|
|
inherit lua;
|
|
|
|
});
|
|
|
|
|
2019-02-04 14:30:58 +03:00
|
|
|
overridenPackages = import ./overrides.nix { inherit pkgs; };
|
|
|
|
|
|
|
|
generatedPackages = if (builtins.pathExists ./generated-packages.nix) then
|
2021-10-04 01:10:46 +03:00
|
|
|
(final: prev: pkgs.callPackage ./generated-packages.nix { inherit (final) callPackage; } final prev) else (final: prev: {});
|
2019-02-04 14:30:58 +03:00
|
|
|
|
|
|
|
extensible-self = lib.makeExtensible
|
|
|
|
(extends overrides
|
|
|
|
(extends overridenPackages
|
|
|
|
(extends generatedPackages
|
|
|
|
initialPackages
|
|
|
|
)
|
|
|
|
)
|
2021-09-12 01:01:49 +03:00
|
|
|
);
|
2019-01-30 17:13:15 +03:00
|
|
|
in
|
|
|
|
extensible-self
|