1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/development/lua-modules/default.nix
Matthieu Coudron 88842910b5 lua: introduced a lua lib
Goal is to improve separation between packages and utilities.
Can help with autocompletion/navigate nixpkgs faster.
Also it will help standardize how LUA_PATH is exported across packages,
so that one can more easily make lua changes across nixpkgs (for
    instance changing where lua modules are installed).
2021-09-12 03:03:56 +02:00

30 lines
682 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
pkgs.callPackage ./generated-packages.nix { } else (final: prev: {});
extensible-self = lib.makeExtensible
(extends overrides
(extends overridenPackages
(extends generatedPackages
initialPackages
)
)
);
in
extensible-self