mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00:00
253af9151f
- 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.
30 lines
733 B
Nix
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
|