2023-03-03 23:20:59 +01:00
|
|
|
{
|
|
|
|
callPackage
|
2023-07-14 21:22:29 +02:00
|
|
|
, lib
|
2023-03-03 23:20:59 +01:00
|
|
|
}:
|
2023-08-04 21:39:29 +02:00
|
|
|
let
|
|
|
|
typeChecked = caller: type: value:
|
|
|
|
let
|
|
|
|
inherit (lib) types mergeDefinitions;
|
|
|
|
defs = [{ file = caller; inherit value; }];
|
|
|
|
type' = types.submodule { options = type; };
|
|
|
|
in (mergeDefinitions [] type' defs).mergedValue;
|
|
|
|
in {
|
2023-03-03 23:20:59 +01:00
|
|
|
pseudofile = callPackage ./pseudofile {};
|
|
|
|
liminix = {
|
|
|
|
services = callPackage ./liminix-tools/services {};
|
|
|
|
networking = callPackage ./liminix-tools/networking {};
|
|
|
|
builders = {
|
|
|
|
squashfs = callPackage ./liminix-tools/builders/squashfs.nix {};
|
|
|
|
kernel = callPackage ./kernel {};
|
|
|
|
};
|
2023-08-04 21:39:29 +02:00
|
|
|
callService = path : parameters :
|
|
|
|
let pkg = callPackage path {};
|
2023-08-16 20:44:00 +02:00
|
|
|
checkTypes = t : p : typeChecked (builtins.toString path) t p;
|
2023-08-04 21:39:29 +02:00
|
|
|
in {
|
|
|
|
inherit parameters;
|
2023-08-27 23:09:43 +02:00
|
|
|
build = { dependencies ? [], ... } @ args :
|
|
|
|
let
|
|
|
|
s = pkg (checkTypes parameters
|
|
|
|
(builtins.removeAttrs args ["dependencies"]));
|
|
|
|
in s.overrideAttrs (o: {
|
|
|
|
dependencies = (builtins.map (d: d.name) dependencies) ++ o.dependencies;
|
|
|
|
buildInputs = dependencies ++ o.buildInputs;
|
|
|
|
});
|
2023-08-04 21:39:29 +02:00
|
|
|
};
|
2023-07-14 21:22:29 +02:00
|
|
|
lib = {
|
2023-08-04 21:39:29 +02:00
|
|
|
types =
|
|
|
|
let inherit (lib) types isDerivation;
|
2023-08-23 21:28:49 +02:00
|
|
|
in rec {
|
2023-08-04 21:39:29 +02:00
|
|
|
service = types.package // {
|
2023-07-14 21:22:29 +02:00
|
|
|
name = "service";
|
|
|
|
description = "s6-rc service";
|
2023-08-04 21:39:29 +02:00
|
|
|
check = x: isDerivation x && x ? serviceType;
|
2023-07-14 21:22:29 +02:00
|
|
|
};
|
2023-08-23 21:28:49 +02:00
|
|
|
interface = service;
|
2023-08-04 21:39:29 +02:00
|
|
|
serviceDefn = types.attrs // {
|
|
|
|
name = "service-defn";
|
|
|
|
description = "parametrisable s6-rc service definition";
|
|
|
|
check = x: lib.isAttrs x && x ? parameters && x ? build;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
inherit typeChecked;
|
2023-07-14 21:22:29 +02:00
|
|
|
};
|
2023-03-03 23:20:59 +01:00
|
|
|
};
|
2023-05-29 21:20:12 +02:00
|
|
|
writeFennelScript = callPackage ./write-fennel-script {};
|
2023-09-12 18:45:18 +02:00
|
|
|
writeFennel = callPackage ./write-fennel {};
|
2023-03-03 23:20:59 +01:00
|
|
|
writeAshScript = callPackage ./write-ash-script {};
|
2023-04-05 00:35:49 +02:00
|
|
|
systemconfig = callPackage ./systemconfig {};
|
2023-03-03 23:20:59 +01:00
|
|
|
s6-init-bin = callPackage ./s6-init-bin {};
|
|
|
|
s6-rc-database = callPackage ./s6-rc-database {};
|
|
|
|
mips-vm = callPackage ./mips-vm {};
|
2023-05-23 00:31:57 +02:00
|
|
|
ppp = callPackage ./ppp {};
|
2023-03-03 23:20:59 +01:00
|
|
|
pppoe = callPackage ./pppoe {};
|
|
|
|
|
|
|
|
kernel-backport = callPackage ./kernel-backport {};
|
|
|
|
mac80211 = callPackage ./mac80211 {};
|
|
|
|
netlink-lua = callPackage ./netlink-lua {};
|
2023-06-01 00:29:05 +02:00
|
|
|
linotify = callPackage ./linotify {};
|
2023-03-03 23:20:59 +01:00
|
|
|
ifwait = callPackage ./ifwait {};
|
|
|
|
|
2023-04-04 23:47:59 +02:00
|
|
|
gen_init_cpio = callPackage ./gen_init_cpio {};
|
|
|
|
|
2023-03-03 23:20:59 +01:00
|
|
|
serviceFns = callPackage ./service-fns {};
|
|
|
|
|
|
|
|
# these are packages for the build system not the host/target
|
|
|
|
|
|
|
|
tufted = callPackage ./tufted {};
|
|
|
|
routeros = callPackage ./routeros {};
|
|
|
|
go-l2tp = callPackage ./go-l2tp {};
|
|
|
|
|
|
|
|
# we need to build real lzma instead of using xz, because the lzma
|
|
|
|
# decoder in u-boot doesn't understand streaming lzma archives
|
|
|
|
# ("Stream with EOS marker is not supported") and xz can't create
|
|
|
|
# non-streaming ones. See
|
|
|
|
# https://sourceforge.net/p/squashfs/mailman/message/26599379/
|
|
|
|
lzma = callPackage ./lzma {};
|
|
|
|
|
2023-04-15 18:35:02 +02:00
|
|
|
preinit = callPackage ./preinit {};
|
2023-03-05 23:32:56 +01:00
|
|
|
swconfig = callPackage ./swconfig {};
|
2023-05-25 00:01:50 +02:00
|
|
|
odhcp6c = callPackage ./odhcp6c {};
|
2023-03-18 20:17:58 +01:00
|
|
|
|
|
|
|
openwrt = callPackage ./openwrt {};
|
2023-04-23 12:38:22 +02:00
|
|
|
|
2023-05-07 00:03:51 +02:00
|
|
|
initramfs-peek = callPackage ./initramfs-peek {};
|
2023-05-20 22:09:22 +02:00
|
|
|
min-collect-garbage = callPackage ./min-collect-garbage {};
|
2023-05-06 23:47:03 +02:00
|
|
|
min-copy-closure = callPackage ./min-copy-closure {};
|
2023-04-23 12:38:22 +02:00
|
|
|
hi = callPackage ./hi {};
|
2023-06-18 18:40:16 +02:00
|
|
|
firewallgen = callPackage ./firewallgen {};
|
2023-06-27 22:17:04 +02:00
|
|
|
kernel-modules = callPackage ./kernel-modules {};
|
2023-06-30 21:02:03 +02:00
|
|
|
odhcp-script = callPackage ./odhcp-script {};
|
2023-07-04 23:56:17 +02:00
|
|
|
fennel = callPackage ./fennel {};
|
2023-07-04 23:58:51 +02:00
|
|
|
fennelrepl = callPackage ./fennelrepl {};
|
2023-07-05 21:23:27 +02:00
|
|
|
anoia = callPackage ./anoia {};
|
2023-03-03 23:20:59 +01:00
|
|
|
}
|