3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/lua-modules/default.nix
Matthieu Coudron 253af9151f luaPackages: update
- luarocks-nix: bumped to pass args too, `package_X = callPackage ...`.
  It allows to remove the annoying `with self`.
  This new version disables tests (because broken) and now emits derivation
  with a callPackage in front.
- replaced X.override with lib.overrideLuarocks, it should be used
whenever buildInputs/extraVariables is changed since it impacts the
generated luarocks config.
Once structured attributes are in, it will be easier to have the
luarocks config generated by a hook and we probably will be able to
replace all overrideLuarocks by overrideAttrs.
2021-10-18 19:48:07 +02:00

30 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