convert devices from overlay to module

this makes it possible for devices to stash things in
`config` (e.g. pathname to DTS) that can later be overwritten
(even by the end user)
This commit is contained in:
Daniel Barlow 2023-02-10 17:54:33 +00:00
parent 6be459b9ac
commit 8cead61740
8 changed files with 263 additions and 278 deletions

View file

@ -8,14 +8,14 @@
let let
overlay = import ./overlay.nix; overlay = import ./overlay.nix;
pkgs = import nixpkgs (device.system // { pkgs = import nixpkgs (device.system // {
overlays = [overlay device.overlay]; overlays = [overlay];
config = {allowUnsupportedSystem = true; }; config = {allowUnsupportedSystem = true; };
}); });
inherit (pkgs) callPackage writeText liminix fetchFromGitHub; inherit (pkgs) callPackage writeText liminix fetchFromGitHub;
inherit (pkgs.lib) concatStringsSep; inherit (pkgs.lib) concatStringsSep;
config = (import ./merge-modules.nix) [ config = (import ./merge-modules.nix) [
./modules/base.nix ./modules/base.nix
({ lib, ... } : { config = { inherit (device) kernel; }; }) device.module
liminix-config liminix-config
./modules/s6 ./modules/s6
./modules/users.nix ./modules/users.nix
@ -33,11 +33,11 @@ let
outputs = rec { outputs = rec {
inherit squashfs; inherit squashfs;
kernel = pkgs.kernel.override { kernel = liminix.builders.kernel.override {
inherit (config.kernel) config; inherit (config.kernel) config src extraPatchPhase;
}; };
dtb = (callPackage ./kernel/dtb.nix {}) { dtb = (callPackage ./kernel/dtb.nix {}) {
dts = config.kernel.dts { inherit openwrt; }; dts = config.kernel.dts;
includes = [ includes = [
"${openwrt}/target/linux/ath79/dts" "${openwrt}/target/linux/ath79/dts"
"${kernel.headers}/include" "${kernel.headers}/include"
@ -91,7 +91,7 @@ let
tftpd = pkgs.buildPackages.tufted; tftpd = pkgs.buildPackages.tufted;
}; };
in { in {
outputs = outputs // { default = outputs.${device.outputs.default}; }; outputs = outputs // { default = outputs.${config.device.defaultOutput}; };
# this is just here as a convenience, so that we can get a # this is just here as a convenience, so that we can get a
# cross-compiling nix-shell for any package we're customizing # cross-compiling nix-shell for any package we're customizing

View file

@ -24,15 +24,9 @@
}; };
}; };
# We need to be able to import default.nix before we import nixpkgs module = {pkgs, ... }:
# because it has the system config to tell nixpkgs what arch to build for.
# But we also need some way to do things like fetchFromGitHub in the
# per-device config and we can only do that once we have a reference to
# pkgs
overlay = final: prev:
let let
openwrt = final.fetchFromGitHub { openwrt = pkgs.pkgsBuildBuild.fetchFromGitHub {
name = "openwrt-source"; name = "openwrt-source";
repo = "openwrt"; repo = "openwrt";
owner = "openwrt"; owner = "openwrt";
@ -40,8 +34,14 @@
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8="; hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
}; };
in { in {
kernel = prev.kernel.override { device.defaultOutput = "directory";
src = final.fetchurl { device.boot = {
loadAddress = "0x80060000";
entryPoint = "0x80060000";
};
kernel = {
src = pkgs.pkgsBuildBuild.fetchurl {
name = "linux.tar.gz"; name = "linux.tar.gz";
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz"; url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz";
hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8="; hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8=";
@ -59,72 +59,65 @@
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
patches ${openwrt}/target/linux/ath79/patches-5.15/*.patch patches ${openwrt}/target/linux/ath79/patches-5.15/*.patch
''; '';
dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
ATH79 = "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
# need this to open console device at boot. dmesg goes from
# [ 0.272934] Warning: unable to open an initial console.
# to
# [ 0.247413] printk: console [ttyS0] disabled
# [ 0.25200] 18020000.uart: ttyS0 at MMIO 0x1802000 (irq = 10, base_baud = 1562500) is a 16550A
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
NET_VENDOR_ATHEROS = "y";
AG71XX = "y"; # ethernet (qca,qca9530-eth)
MFD_SYSCON = "y"; # ethernet (compatible "syscon")
AR8216_PHY = "y"; # eth1 is behind a switch
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
CPU_BIG_ENDIAN= "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
}; };
}; };
kernel = rec {
dts = { openwrt,... }:"${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
ATH79 = "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
# need this to open console device at boot. dmesg goes from
# [ 0.272934] Warning: unable to open an initial console.
# to
# [ 0.247413] printk: console [ttyS0] disabled
# [ 0.25200] 18020000.uart: ttyS0 at MMIO 0x1802000 (irq = 10, base_baud = 1562500) is a 16550A
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
NET_VENDOR_ATHEROS = "y";
AG71XX = "y"; # ethernet (qca,qca9530-eth)
MFD_SYSCON = "y"; # ethernet (compatible "syscon")
AR8216_PHY = "y"; # eth1 is behind a switch
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
CPU_BIG_ENDIAN= "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
};
outputs.default = "directory";
boot = {
loadAddress = "0x80060000";
entryPoint = "0x80060000";
};
} }

View file

@ -11,15 +11,9 @@
}; };
}; };
# We need to be able to import default.nix before we import nixpkgs module = { pkgs, ...}:
# because it has the system config to tell nixpkgs what arch to build for.
# But we also need some way to do things like fetchFromGitHub in the
# per-device config and we can only do that once we have a reference to
# pkgs
overlay = final: prev:
let let
openwrt = final.fetchFromGitHub { openwrt = pkgs.fetchFromGitHub {
name = "openwrt-source"; name = "openwrt-source";
repo = "openwrt"; repo = "openwrt";
owner = "openwrt"; owner = "openwrt";
@ -27,8 +21,16 @@
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8="; hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
}; };
in { in {
kernel = prev.kernel.override { device = {
src = final.fetchurl { defaultOutput = "directory";
boot = {
loadAddress = "0x80000000";
entryPoint = "0x80000000";
};
};
kernel = {
src = pkgs.fetchurl {
name = "linux.tar.gz"; name = "linux.tar.gz";
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz"; url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz";
hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8="; hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8=";
@ -46,69 +48,62 @@
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
''; '';
dts = "${openwrt}/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
RALINK = "y";
SOC_MT7620 = "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
# NET_VENDOR_ATHEROS = "y";
# AG71XX = "y"; # ethernet (qca,qca9530-eth)
# MFD_SYSCON = "y"; # ethernet (compatible "syscon")
# AR8216_PHY = "y"; # eth1 is behind a switch
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
CPU_LITTLE_ENDIAN= "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
}; };
}; };
kernel = rec {
dts = { openwrt,... } : "${openwrt}/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
RALINK = "y";
SOC_MT7620 = "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
# NET_VENDOR_ATHEROS = "y";
# AG71XX = "y"; # ethernet (qca,qca9530-eth)
# MFD_SYSCON = "y"; # ethernet (compatible "syscon")
# AR8216_PHY = "y"; # eth1 is behind a switch
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs
CPU_LITTLE_ENDIAN= "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
};
outputs.default = "directory";
boot = {
loadAddress = "0x80000000";
entryPoint = "0x80000000";
};
} }

View file

@ -11,15 +11,9 @@
}; };
}; };
# We need to be able to import default.nix before we import nixpkgs module = { pkgs, ...}:
# because it has the system config to tell nixpkgs what arch to build for.
# But we also need some way to do things like fetchFromGitHub in the
# per-device config and we can only do that once we have a reference to
# pkgs
overlay = final: prev:
let let
openwrt = final.fetchFromGitHub { openwrt = pkgs.fetchFromGitHub {
name = "openwrt-source"; name = "openwrt-source";
repo = "openwrt"; repo = "openwrt";
owner = "openwrt"; owner = "openwrt";
@ -27,8 +21,16 @@
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8="; hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
}; };
in { in {
kernel = prev.kernel.override { device = {
src = final.fetchurl { defaultOutput = "directory";
boot = {
loadAddress = "0x80000000";
entryPoint = "0x80000000";
};
};
kernel = {
src = pkgs.fetchurl {
name = "linux.tar.gz"; name = "linux.tar.gz";
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz"; url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz";
hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8="; hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8=";
@ -46,80 +48,73 @@
patches ${openwrt}/target/linux/generic/hack-5.15/*.patch patches ${openwrt}/target/linux/generic/hack-5.15/*.patch
patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch patches ${openwrt}/target/linux/ramips/patches-5.15/*.patch
''; '';
dts = "${openwrt}/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
RALINK = "y";
SOC_MT7620 = "y";
CPU_LITTLE_ENDIAN= "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_dev
REGULATOR = "y";
REGULATOR_FIXED_VOLTAGE = "y";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
PHYLIB = "y";
AT803X_PHY="y";
FIXED_PHY="y";
GENERIC_PHY="y";
NET_VENDOR_RALINK = "y";
NET_RALINK_RT3050 = "y";
NET_RALINK_SOC="y";
SWCONFIG = "y";
GPIOLIB="y";
GPIO_MT7621 = "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
}; };
}; };
kernel = rec {
dts = { openwrt,... } : "${openwrt}/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts";
config = {
MIPS_ELF_APPENDED_DTB = "y";
OF = "y";
USE_OF = "y";
RALINK = "y";
SOC_MT7620 = "y";
CPU_LITTLE_ENDIAN= "y";
SERIAL_8250_CONSOLE = "y";
SERIAL_8250 = "y";
SERIAL_CORE_CONSOLE = "y";
SERIAL_OF_PLATFORM = "y";
CONSOLE_LOGLEVEL_DEFAULT = "8";
CONSOLE_LOGLEVEL_QUIET = "4";
# "empty" initramfs source should create an initial
# filesystem that has a /dev/console node and not much
# else. Note that pid 1 is started *before* the root
# filesystem is mounted and it expects /dev/console to
# be present already
BLK_DEV_INITRD = "n";
MTD = "y";
MTD_CMDLINE_PARTS = "y";
MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_dev
REGULATOR = "y";
REGULATOR_FIXED_VOLTAGE = "y";
NET = "y";
NETDEVICES = "y";
ETHERNET = "y";
PHYLIB = "y";
AT803X_PHY="y";
FIXED_PHY="y";
GENERIC_PHY="y";
NET_VENDOR_RALINK = "y";
NET_RALINK_RT3050 = "y";
NET_RALINK_SOC="y";
SWCONFIG = "y";
GPIOLIB="y";
GPIO_MT7621 = "y";
# this is all copied from nixwrt ath79 config. Clearly not all
# of it is device config, some of it is wifi config or
# installation method config or ...
"CMDLINE_PARTITION" = "y";
"EARLY_PRINTK" = "y";
"FW_LOADER" = "y";
# we don't have a user helper, so we get multiple 60s pauses
# at boot time unless we disable trying to call it
"FW_LOADER_USER_HELPER" = "n";
"MODULE_SIG" = "y";
"PARTITION_ADVANCED" = "y";
"PRINTK_TIME" = "y";
"SQUASHFS" = "y";
"SQUASHFS_XZ" = "y";
};
};
outputs.default = "directory";
boot = {
loadAddress = "0x80000000";
entryPoint = "0x80000000";
};
} }

View file

@ -13,42 +13,34 @@
}; };
}; };
overlay = final: prev: module = {pkgs, ... }: {
let inherit (final) stdenvNoCC fetchFromGitHub; kernel = {
in { src = pkgs.pkgsBuildBuild.fetchurl {
kernel = prev.kernel.override { name = "linux.tar.gz";
# using fetchurl not fetchzip because it doesn't unpack, and url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.19.16.tar.gz";
# copying 6GB of data from one store location to another hash = "sha256-m4NeoEsCEK0HSIKTZ6zYTgk1fD3W0PSOMXN6fyHpkP8=";
# takes an absolute bloody age };
src = final.fetchurl { config = {
name = "linux.tar.gz"; MIPS_MALTA= "y";
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.19.16.tar.gz"; CPU_LITTLE_ENDIAN= "n";
hash = "sha256-m4NeoEsCEK0HSIKTZ6zYTgk1fD3W0PSOMXN6fyHpkP8="; CPU_BIG_ENDIAN= "y";
}; CPU_MIPS32_R2= "y";
SQUASHFS = "y";
SQUASHFS_XZ = "y";
VIRTIO_MENU = "y";
PCI = "y";
VIRTIO_PCI = "y";
BLOCK = "y";
VIRTIO_BLK = "y";
NETDEVICES = "y";
VIRTIO_NET = "y";
SERIAL_8250= "y";
SERIAL_8250_CONSOLE= "y";
}; };
}; };
device.defaultOutput = "directory";
kernel = {
config = {
MIPS_MALTA= "y";
CPU_LITTLE_ENDIAN= "n";
CPU_BIG_ENDIAN= "y";
CPU_MIPS32_R2= "y";
SQUASHFS = "y";
SQUASHFS_XZ = "y";
VIRTIO_MENU = "y";
PCI = "y";
VIRTIO_PCI = "y";
BLOCK = "y";
VIRTIO_BLK = "y";
NETDEVICES = "y";
VIRTIO_NET = "y";
SERIAL_8250= "y";
SERIAL_8250_CONSOLE= "y";
};
}; };
outputs.default = "directory";
} }

View file

@ -24,7 +24,12 @@ in {
}; };
filesystem = mkOption { type = types.anything; }; filesystem = mkOption { type = types.anything; };
kernel = { kernel = {
dts = mkOption { type = types.functionTo types.string; }; src = mkOption { type = types.package; } ;
extraPatchPhase = mkOption {
default = "true";
type = types.lines;
} ;
dts = mkOption { type = types.string; };
config = mkOption { config = mkOption {
# mostly the values are y n or m, but sometimes # mostly the values are y n or m, but sometimes
# other strings are also used # other strings are also used
@ -40,6 +45,12 @@ in {
users = mkOption { users = mkOption {
type = types.attrsOf types.anything; type = types.attrsOf types.anything;
}; };
device = {
defaultOutput = mkOption {
type = types.nonEmptyStr;
};
boot = mkOption { type = types.any; };
};
}; };
config = { config = {
defaultProfile.packages = with pkgs; defaultProfile.packages = with pkgs;

View file

@ -6,14 +6,13 @@ final: prev: {
networking = final.callPackage ./pkgs/liminix-tools/networking {}; networking = final.callPackage ./pkgs/liminix-tools/networking {};
builders = { builders = {
squashfs = final.callPackage ./pkgs/liminix-tools/builders/squashfs.nix {}; squashfs = final.callPackage ./pkgs/liminix-tools/builders/squashfs.nix {};
kernel = final.callPackage ./pkgs/kernel {};
}; };
}; };
writeAshScript = final.callPackage ./pkgs/write-ash-script {}; writeAshScript = final.callPackage ./pkgs/write-ash-script {};
s6-init-bin = final.callPackage ./pkgs/s6-init-bin {}; s6-init-bin = final.callPackage ./pkgs/s6-init-bin {};
s6-rc-database = final.callPackage ./pkgs/s6-rc-database {}; s6-rc-database = final.callPackage ./pkgs/s6-rc-database {};
kernel = final.callPackage ./pkgs/kernel {};
dnsmasq = dnsmasq =
let d = prev.dnsmasq.overrideAttrs(o: { let d = prev.dnsmasq.overrideAttrs(o: {
preBuild = '' preBuild = ''

View file

@ -6,7 +6,7 @@
, config , config
, src , src
, extraPatchPhase ? "true" , extraPatchPhase ? "echo"
} : } :
let writeConfig = name : config: writeText name let writeConfig = name : config: writeText name
(builtins.concatStringsSep (builtins.concatStringsSep