trivionomicon/doctrine: add support for overriding the prefix
This commit is contained in:
parent
c651b8c470
commit
7daa3d91b3
3 changed files with 28 additions and 18 deletions
|
@ -1,12 +1,16 @@
|
||||||
{
|
{
|
||||||
|
lib ? pkgs.lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
namespace,
|
prefix ? "trivium",
|
||||||
|
namespace ? null,
|
||||||
}: let
|
}: let
|
||||||
doctrine = {
|
doctrine =
|
||||||
lib = import ./lib {inherit lib pkgs doctrine;};
|
{
|
||||||
prefix = "trivium";
|
lib = import ./lib {inherit lib pkgs doctrine;};
|
||||||
inherit namespace;
|
inherit namespace prefix;
|
||||||
};
|
}
|
||||||
inherit (pkgs) lib;
|
// lib.optionalAttrs (pkgs != null) {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
doctrine
|
doctrine
|
||||||
|
|
|
@ -13,8 +13,11 @@
|
||||||
|
|
||||||
closeLib = close {inherit lib;};
|
closeLib = close {inherit lib;};
|
||||||
closeFull = close {inherit lib pkgs doctrine;};
|
closeFull = close {inherit lib pkgs doctrine;};
|
||||||
in {
|
in
|
||||||
inherit close;
|
{
|
||||||
importAll = closeLib ./import-all.nix;
|
inherit close;
|
||||||
mkModule = closeFull ./mk-module.nix;
|
importAll = closeLib ./import-all.nix;
|
||||||
}
|
}
|
||||||
|
// lib.optionalAttrs (doctrine.namespace != null) {
|
||||||
|
mkModule = closeFull ./mk-module.nix;
|
||||||
|
}
|
||||||
|
|
|
@ -11,14 +11,17 @@
|
||||||
requires ? [],
|
requires ? [],
|
||||||
prefix ? doctrine.prefix,
|
prefix ? doctrine.prefix,
|
||||||
namespace ? doctrine.namespace,
|
namespace ? doctrine.namespace,
|
||||||
|
passthru ? {},
|
||||||
}: let
|
}: let
|
||||||
optionsSet = import options {
|
optionsSet = import options (passthru
|
||||||
inherit config lib pkgs cfg name doctrine;
|
// {
|
||||||
};
|
inherit config lib pkgs cfg name doctrine;
|
||||||
|
});
|
||||||
|
|
||||||
configSet = import configFiles.${namespace} {
|
configSet = import configFiles.${namespace} (passthru
|
||||||
inherit config lib pkgs doctrine cfg;
|
// {
|
||||||
};
|
inherit config lib pkgs doctrine cfg;
|
||||||
|
});
|
||||||
|
|
||||||
configFiles = lib.filterAttrs (k: v: v != null) {
|
configFiles = lib.filterAttrs (k: v: v != null) {
|
||||||
inherit sys hm;
|
inherit sys hm;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue