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