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
|
|
|
liminix = {
|
|
|
|
builders = {
|
|
|
|
squashfs = callPackage ./liminix-tools/builders/squashfs.nix {};
|
2024-08-26 18:55:58 +02:00
|
|
|
jffs2 = callPackage ./liminix-tools/builders/jffs2.nix {};
|
2023-09-20 18:57:17 +02:00
|
|
|
dtb = callPackage ./kernel/dtb.nix {};
|
|
|
|
uimage = callPackage ./kernel/uimage.nix {};
|
2023-03-03 23:20:59 +01:00
|
|
|
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
|
|
|
};
|
2024-01-04 11:15:23 +01:00
|
|
|
networking = callPackage ./liminix-tools/networking {};
|
|
|
|
services = callPackage ./liminix-tools/services {};
|
2023-03-03 23:20:59 +01:00
|
|
|
};
|
|
|
|
|
2024-01-04 11:15:23 +01:00
|
|
|
# please keep the rest of this list alphabetised :-)
|
2023-03-03 23:20:59 +01:00
|
|
|
|
2024-01-04 11:15:23 +01:00
|
|
|
anoia = callPackage ./anoia {};
|
2024-04-20 18:45:40 +02:00
|
|
|
devout = callPackage ./devout {};
|
2024-01-04 11:15:23 +01:00
|
|
|
fennel = callPackage ./fennel {};
|
|
|
|
fennelrepl = callPackage ./fennelrepl {};
|
2024-01-30 11:20:57 +01:00
|
|
|
firewallgen = callPackage ./firewallgen {};
|
|
|
|
firmware-utils = callPackage ./firmware-utils {};
|
2023-04-04 23:47:59 +02:00
|
|
|
gen_init_cpio = callPackage ./gen_init_cpio {};
|
2023-03-03 23:20:59 +01:00
|
|
|
go-l2tp = callPackage ./go-l2tp {};
|
2024-01-04 11:15:23 +01:00
|
|
|
hi = callPackage ./hi {};
|
|
|
|
ifwait = callPackage ./ifwait {};
|
|
|
|
initramfs-peek = callPackage ./initramfs-peek {};
|
|
|
|
kernel-backport = callPackage ./kernel-backport {};
|
2024-02-12 00:47:11 +01:00
|
|
|
kmodloader = callPackage ./kmodloader {};
|
2024-01-04 11:15:23 +01:00
|
|
|
levitate = callPackage ./levitate {};
|
|
|
|
libubootenv = callPackage ./libubootenv {};
|
|
|
|
linotify = callPackage ./linotify {};
|
2024-04-23 23:41:38 +02:00
|
|
|
lualinux = callPackage ./lualinux {};
|
2023-03-03 23:20:59 +01:00
|
|
|
|
|
|
|
# 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 {};
|
|
|
|
|
2024-01-04 11:15:23 +01:00
|
|
|
mac80211 = callPackage ./mac80211 {};
|
2023-12-04 16:04:24 +01:00
|
|
|
zyxel-bootconfig = callPackage ./zyxel-bootconfig {};
|
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 {};
|
2024-04-20 16:09:17 +02:00
|
|
|
minisock = callPackage ./minisock {};
|
2024-04-06 13:33:22 +02:00
|
|
|
nellie = callPackage ./nellie {};
|
2024-01-04 11:15:23 +01:00
|
|
|
netlink-lua = callPackage ./netlink-lua {};
|
2023-06-30 21:02:03 +02:00
|
|
|
odhcp-script = callPackage ./odhcp-script {};
|
2024-01-04 11:15:23 +01:00
|
|
|
odhcp6c = callPackage ./odhcp6c {};
|
|
|
|
openwrt = callPackage ./openwrt {};
|
|
|
|
ppp = callPackage ./ppp {};
|
|
|
|
pppoe = callPackage ./pppoe {};
|
|
|
|
preinit = callPackage ./preinit {};
|
|
|
|
pseudofile = callPackage ./pseudofile {};
|
|
|
|
routeros = callPackage ./routeros {};
|
|
|
|
run-liminix-vm = callPackage ./run-liminix-vm {};
|
|
|
|
s6-init-bin = callPackage ./s6-init-bin {};
|
|
|
|
s6-rc-database = callPackage ./s6-rc-database {};
|
2024-01-05 01:07:01 +01:00
|
|
|
|
|
|
|
# schnapps is written by Turris and provides a high-level interface
|
|
|
|
# to btrfs snapshots. It may be useful on the Turris Omnia to
|
|
|
|
# install Liminix while retaining the ability to rollback to the
|
|
|
|
# vendor OS, or even to derisk Liminix updates on that device
|
|
|
|
schnapps = callPackage ./schnapps {};
|
|
|
|
|
2024-01-04 11:15:23 +01:00
|
|
|
serviceFns = callPackage ./service-fns {};
|
|
|
|
swconfig = callPackage ./swconfig {};
|
|
|
|
systemconfig = callPackage ./systemconfig {};
|
|
|
|
tufted = callPackage ./tufted {};
|
2024-09-04 15:53:19 +02:00
|
|
|
libubox = callPackage ./libubox {};
|
2024-09-04 15:53:26 +02:00
|
|
|
ubus = callPackage ./ubus {};
|
2024-09-04 15:58:27 +02:00
|
|
|
usteer = callPackage ./usteer {};
|
2024-04-15 22:15:07 +02:00
|
|
|
uevent-watch = callPackage ./uevent-watch {};
|
2024-05-14 13:56:58 +02:00
|
|
|
usb-modeswitch = callPackage ./usb-modeswitch {};
|
2024-01-04 11:15:23 +01:00
|
|
|
writeAshScript = callPackage ./write-ash-script {};
|
|
|
|
writeFennel = callPackage ./write-fennel {};
|
|
|
|
writeFennelScript = callPackage ./write-fennel-script {};
|
2023-03-03 23:20:59 +01:00
|
|
|
}
|