ci.nix (1705B)
1 { 2 nixpkgs 3 , unstable 4 , liminix 5 , ... }: 6 let 7 inherit (builtins) map; 8 pkgs = (import nixpkgs {}); 9 borderVmConf = ./bordervm.conf-example.nix; 10 inherit (pkgs.lib.attrsets) genAttrs; 11 devices = [ "qemu" "gl-ar750" "gl-mt300n-v2" "gl-mt300a" ]; 12 vanilla = ./vanilla-configuration.nix; 13 for-device = name: 14 (import liminix { 15 inherit nixpkgs borderVmConf; 16 device = import (liminix + "/devices/${name}"); 17 liminix-config = vanilla; 18 }).outputs.default; 19 tests = import ./tests/ci.nix; 20 jobs = 21 (genAttrs devices (name: for-device name)) // 22 tests // 23 { 24 buildEnv = (import liminix { 25 inherit nixpkgs borderVmConf; 26 device = import (liminix + "/devices/qemu"); 27 liminix-config = vanilla; 28 }).buildEnv; 29 doc = pkgs.stdenv.mkDerivation { 30 name = "liminix-doc"; 31 nativeBuildInputs = with pkgs; [ 32 gnumake sphinx 33 fennel luaPackages.lyaml 34 ]; 35 src = ./doc; 36 buildPhase = '' 37 cat ${(import ./doc/extract-options.nix).doc} | fennel --correlate parse-options.fnl > modules.rst 38 make html 39 ''; 40 installPhase = '' 41 mkdir -p $out/nix-support $out/share/doc/ 42 # (cd _build && tar cf $out/share/doc/liminix_manual.tar html) 43 cp -a _build/html $out/share/doc/liminix 44 echo "file source-dist \"$out/share/doc/liminix\"" \ 45 > $out/nix-support/hydra-build-products 46 ''; 47 }; 48 with-unstable = (import liminix { 49 nixpkgs = unstable; 50 inherit borderVmConf; 51 device = import (liminix + "/devices/qemu"); 52 liminix-config = vanilla; 53 }).outputs.default; 54 }; 55 in jobs