nixfmt-rfc-style

There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
This commit is contained in:
Daniel Barlow
2025-02-10 21:55:08 +00:00
parent 13cc5a8992
commit 7e2b0068e6
211 changed files with 6049 additions and 4355 deletions

View File

@@ -1,44 +1,55 @@
let check = deviceName : config :
let derivation = (import <liminix> {
device = import (<liminix/devices> + "/${deviceName}");
liminix-config = { ... } : {
imports = [./configuration.nix];
inherit config;
};
});
img = derivation.outputs.tftpboot;
uboot = derivation.outputs.u-boot;
pkgsBuild = derivation.pkgs.pkgsBuildBuild;
in pkgsBuild.runCommand "check-${deviceName}" {
nativeBuildInputs = with pkgsBuild; [
expect
socat
run-liminix-vm
] ;
} ''
mkdir vm
ln -s ${img} result
let
check =
deviceName: config:
let
derivation = (
import <liminix> {
device = import (<liminix/devices> + "/${deviceName}");
liminix-config =
{ ... }:
{
imports = [ ./configuration.nix ];
inherit config;
};
}
);
img = derivation.outputs.tftpboot;
uboot = derivation.outputs.u-boot;
pkgsBuild = derivation.pkgs.pkgsBuildBuild;
in
pkgsBuild.runCommand "check-${deviceName}"
{
nativeBuildInputs = with pkgsBuild; [
expect
socat
run-liminix-vm
];
}
''
mkdir vm
ln -s ${img} result
touch empty empty2
touch empty empty2
run-liminix-vm \
--background ./vm \
--u-boot ${uboot}/u-boot.bin \
--arch ${derivation.pkgs.stdenv.hostPlatform.qemuArch} \
--wan "user,tftp=`pwd`" \
--disk-image empty2 \
empty empty2
run-liminix-vm \
--background ./vm \
--u-boot ${uboot}/u-boot.bin \
--arch ${derivation.pkgs.stdenv.hostPlatform.qemuArch} \
--wan "user,tftp=`pwd`" \
--disk-image empty2 \
empty empty2
expect ${./script.expect} 2>&1 |tee $out
'';
in {
aarch64 = check "qemu-aarch64" {};
arm = check "qemu-armv7l" {};
armZimage = check "qemu-armv7l" {
expect ${./script.expect} 2>&1 |tee $out
'';
in
{
aarch64 = check "qemu-aarch64" { };
arm = check "qemu-armv7l" { };
armZimage = check "qemu-armv7l" {
boot.tftp.kernelFormat = "zimage";
};
mips = check "qemu" {};
mipsLz = check "qemu" {
mips = check "qemu" { };
mipsLz = check "qemu" {
boot.tftp.compressRoot = true;
};
# this works on real hardware but I haven't figured out how