liminix/pkgs/default.nix

95 lines
3.1 KiB
Nix
Raw Normal View History

2023-03-03 22:20:59 +00:00
{
callPackage
2023-07-14 19:22:29 +00:00
, lib
2023-03-03 22:20:59 +00: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 22:20:59 +00: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 {};
};
callService = path : parameters :
let pkg = callPackage path {};
2023-08-16 18:44:00 +00:00
checkTypes = t : p : typeChecked (builtins.toString path) t p;
in {
inherit parameters;
build = args : pkg (checkTypes parameters args);
};
2023-07-14 19:22:29 +00:00
lib = {
types =
let inherit (lib) types isDerivation;
in {
service = types.package // {
2023-07-14 19:22:29 +00:00
name = "service";
description = "s6-rc service";
check = x: isDerivation x && x ? serviceType;
2023-07-14 19:22:29 +00: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 19:22:29 +00:00
};
2023-03-03 22:20:59 +00:00
};
writeFennelScript = callPackage ./write-fennel-script {};
2023-03-03 22:20:59 +00:00
writeAshScript = callPackage ./write-ash-script {};
systemconfig = callPackage ./systemconfig {};
2023-03-03 22:20:59 +00:00
s6-init-bin = callPackage ./s6-init-bin {};
s6-rc-database = callPackage ./s6-rc-database {};
mips-vm = callPackage ./mips-vm {};
2023-05-22 22:31:57 +00:00
ppp = callPackage ./ppp {};
2023-03-03 22:20:59 +00:00
pppoe = callPackage ./pppoe {};
kernel-backport = callPackage ./kernel-backport {};
mac80211 = callPackage ./mac80211 {};
netlink-lua = callPackage ./netlink-lua {};
linotify = callPackage ./linotify {};
2023-03-03 22:20:59 +00:00
ifwait = callPackage ./ifwait {};
gen_init_cpio = callPackage ./gen_init_cpio {};
2023-03-03 22:20:59 +00: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 {};
preinit = callPackage ./preinit {};
2023-03-05 22:32:56 +00:00
swconfig = callPackage ./swconfig {};
odhcp6c = callPackage ./odhcp6c {};
openwrt = callPackage ./openwrt {};
initramfs-peek = callPackage ./initramfs-peek {};
min-collect-garbage = callPackage ./min-collect-garbage {};
min-copy-closure = callPackage ./min-copy-closure {};
hi = callPackage ./hi {};
firewallgen = callPackage ./firewallgen {};
kernel-modules = callPackage ./kernel-modules {};
2023-06-30 19:02:03 +00:00
odhcp-script = callPackage ./odhcp-script {};
fennel = callPackage ./fennel {};
fennelrepl = callPackage ./fennelrepl {};
anoia = callPackage ./anoia {};
2023-03-03 22:20:59 +00:00
}