2023-01-29 22:42:53 +01:00
|
|
|
{
|
2023-02-05 23:38:21 +01:00
|
|
|
nixpkgs
|
|
|
|
, unstable
|
|
|
|
, liminix
|
|
|
|
, ... }:
|
|
|
|
let
|
|
|
|
inherit (builtins) map;
|
|
|
|
pkgs = (import nixpkgs {});
|
2023-02-20 18:46:07 +01:00
|
|
|
borderVmConf = ./bordervm.conf-example.nix;
|
2023-02-05 23:38:21 +01:00
|
|
|
inherit (pkgs.lib.attrsets) genAttrs;
|
2023-02-07 00:19:53 +01:00
|
|
|
devices = [ "qemu" "gl-ar750" "gl-mt300n-v2" "gl-mt300a" ];
|
2023-02-05 23:38:21 +01:00
|
|
|
vanilla = ./vanilla-configuration.nix;
|
|
|
|
for-device = name:
|
|
|
|
(import liminix {
|
2023-02-20 18:46:07 +01:00
|
|
|
inherit nixpkgs borderVmConf;
|
2023-02-05 23:38:21 +01:00
|
|
|
device = import (liminix + "/devices/${name}");
|
|
|
|
liminix-config = vanilla;
|
|
|
|
}).outputs.default;
|
|
|
|
tests = import ./tests/ci.nix;
|
|
|
|
jobs =
|
|
|
|
(genAttrs devices (name: for-device name)) // tests // {
|
2023-02-08 01:12:29 +01:00
|
|
|
buildEnv = (import liminix {
|
2023-02-20 18:46:07 +01:00
|
|
|
inherit nixpkgs borderVmConf;
|
2023-02-08 01:12:29 +01:00
|
|
|
device = import (liminix + "/devices/qemu");
|
|
|
|
liminix-config = vanilla;
|
|
|
|
}).buildEnv;
|
2023-05-21 21:53:05 +02:00
|
|
|
doc = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "liminix-doc";
|
|
|
|
nativeBuildInputs = with pkgs; [ gnumake sphinx ];
|
|
|
|
src = ./doc;
|
|
|
|
buildPhase = ''
|
|
|
|
make html
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
dest=$out/share/doc/liminix
|
|
|
|
mkdir -p $dest
|
|
|
|
cp -a _build/html/* $dest
|
|
|
|
'';
|
|
|
|
};
|
2023-02-05 23:38:21 +01:00
|
|
|
with-unstable = (import liminix {
|
|
|
|
nixpkgs = unstable;
|
2023-02-20 18:46:07 +01:00
|
|
|
inherit borderVmConf;
|
2023-02-05 23:38:21 +01:00
|
|
|
device = import (liminix + "/devices/qemu");
|
|
|
|
liminix-config = vanilla;
|
|
|
|
}).outputs.default;
|
|
|
|
};
|
2023-03-10 19:41:43 +01:00
|
|
|
in jobs
|