simplify CI
* I didn't know what I was doing when I set up Hydra * it's not certain that I do now either, but hey ho
This commit is contained in:
parent
336fc7e495
commit
ca9efc4b26
23
ci.nix
23
ci.nix
@ -1,11 +1,6 @@
|
|||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
unstable,
|
|
||||||
liminix,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
pkgs = (import nixpkgs { });
|
pkgs = import <nixpkgs> { };
|
||||||
|
liminix = <liminix>;
|
||||||
borderVmConf = ./bordervm.conf-example.nix;
|
borderVmConf = ./bordervm.conf-example.nix;
|
||||||
inherit (pkgs.lib.attrsets) genAttrs;
|
inherit (pkgs.lib.attrsets) genAttrs;
|
||||||
devices = [
|
devices = [
|
||||||
@ -21,7 +16,7 @@ let
|
|||||||
vanilla = ./vanilla-configuration.nix;
|
vanilla = ./vanilla-configuration.nix;
|
||||||
for-device = name:
|
for-device = name:
|
||||||
(import liminix {
|
(import liminix {
|
||||||
inherit nixpkgs borderVmConf;
|
inherit borderVmConf;
|
||||||
device = import (liminix + "/devices/${name}");
|
device = import (liminix + "/devices/${name}");
|
||||||
liminix-config = vanilla;
|
liminix-config = vanilla;
|
||||||
}).outputs.default;
|
}).outputs.default;
|
||||||
@ -32,7 +27,7 @@ let
|
|||||||
// {
|
// {
|
||||||
buildEnv =
|
buildEnv =
|
||||||
(import liminix {
|
(import liminix {
|
||||||
inherit nixpkgs borderVmConf;
|
inherit borderVmConf;
|
||||||
device = import (liminix + "/devices/qemu");
|
device = import (liminix + "/devices/qemu");
|
||||||
liminix-config = vanilla;
|
liminix-config = vanilla;
|
||||||
}).buildEnv;
|
}).buildEnv;
|
||||||
@ -40,7 +35,7 @@ let
|
|||||||
let
|
let
|
||||||
json =
|
json =
|
||||||
(import liminix {
|
(import liminix {
|
||||||
inherit nixpkgs borderVmConf;
|
inherit borderVmConf;
|
||||||
device = import (liminix + "/devices/qemu");
|
device = import (liminix + "/devices/qemu");
|
||||||
liminix-config =
|
liminix-config =
|
||||||
{ ... }:
|
{ ... }:
|
||||||
@ -74,11 +69,5 @@ let
|
|||||||
> $out/nix-support/hydra-build-products
|
> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
with-unstable = (import liminix {
|
|
||||||
nixpkgs = unstable;
|
|
||||||
inherit borderVmConf;
|
|
||||||
device = import (liminix + "/devices/qemu");
|
|
||||||
liminix-config = vanilla;
|
|
||||||
}).outputs.default;
|
|
||||||
};
|
};
|
||||||
in jobs
|
in (genAttrs devices for-device) # tests # jobs
|
||||||
|
@ -2,14 +2,13 @@
|
|||||||
deviceName ? null,
|
deviceName ? null,
|
||||||
device ? (import ./devices/${deviceName}),
|
device ? (import ./devices/${deviceName}),
|
||||||
liminix-config ? <liminix-config>,
|
liminix-config ? <liminix-config>,
|
||||||
nixpkgs ? <nixpkgs>,
|
|
||||||
borderVmConf ? ./bordervm.conf.nix,
|
borderVmConf ? ./bordervm.conf.nix,
|
||||||
imageType ? "primary",
|
imageType ? "primary",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
overlay = import ./overlay.nix;
|
overlay = import ./overlay.nix;
|
||||||
pkgs = import nixpkgs (
|
pkgs = import <nixpkgs> (
|
||||||
device.system
|
device.system
|
||||||
// {
|
// {
|
||||||
overlays = [ overlay ];
|
overlays = [ overlay ];
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.vmroot;
|
}).outputs.vmroot;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
|
||||||
liminix
|
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
overlay = import "${liminix}/overlay.nix";
|
overlay = import <liminix/overlay.nix>;
|
||||||
pkgs = import <nixpkgs> { overlays = [overlay]; };
|
pkgs = import <nixpkgs> { overlays = [overlay]; };
|
||||||
script = pkgs.writeFennel "foo" {} ./hello.fnl;
|
script = pkgs.writeFennel "foo" {} ./hello.fnl;
|
||||||
inherit (pkgs.lua.pkgs) fifo;
|
inherit (pkgs.lua.pkgs) fifo;
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.vmroot;
|
}).outputs.vmroot;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.vmroot;
|
}).outputs.vmroot;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let lmx = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let lmx = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
});
|
});
|
||||||
rogue = lmx.pkgs.rogue;
|
rogue = lmx.pkgs.rogue;
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.default;
|
}).outputs.default;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
{
|
|
||||||
liminix
|
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
overlay = import "${liminix}/overlay.nix";
|
overlay = import <liminix/overlay.nix>;
|
||||||
nixpkgs = import <nixpkgs> { overlays = [overlay]; };
|
nixpkgs = import <nixpkgs> { overlays = [overlay]; };
|
||||||
fixture = nixpkgs.callPackage ./fixture.nix {};
|
fixture = nixpkgs.callPackage ./fixture.nix {};
|
||||||
in nixpkgs.runCommand "check" {
|
in nixpkgs.runCommand "check" {
|
||||||
nativeBuildInputs = with nixpkgs; [ squashfsTools qprint ] ;
|
nativeBuildInputs = with <nixpkgs>; [ squashfsTools qprint ] ;
|
||||||
} ''
|
} ''
|
||||||
set -e
|
set -e
|
||||||
diff ${fixture} ${./result.expected}
|
diff ${fixture} ${./result.expected}
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
liminix-config = <liminix/vanilla-configuration.nix>;
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = "${liminix}/vanilla-configuration.nix";
|
|
||||||
}).outputs.rootfs;
|
}).outputs.rootfs;
|
||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> {};
|
||||||
in pkgs.runCommand "check" {
|
in pkgs.runCommand "check" {
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{
|
|
||||||
liminix
|
|
||||||
}:
|
|
||||||
let check = deviceName : config :
|
let check = deviceName : config :
|
||||||
let derivation = (import liminix {
|
let derivation = (import <liminix> {
|
||||||
device = import "${liminix}/devices/${deviceName}/";
|
device = import (<liminix/devices> + "/${deviceName}");
|
||||||
liminix-config = { ... } : {
|
liminix-config = { ... } : {
|
||||||
imports = [./configuration.nix];
|
imports = [./configuration.nix];
|
||||||
inherit config;
|
inherit config;
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.vmroot;
|
}).outputs.vmroot;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
let img = (import <liminix> {
|
||||||
liminix
|
device = import <liminix/devices/qemu-armv7l>;
|
||||||
, nixpkgs
|
|
||||||
}:
|
|
||||||
let img = (import liminix {
|
|
||||||
device = import "${liminix}/devices/qemu-armv7l/";
|
|
||||||
liminix-config = ./configuration.nix;
|
liminix-config = ./configuration.nix;
|
||||||
}).outputs.default;
|
}).outputs.default;
|
||||||
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
pkgs = import <nixpkgs> { overlays = [(import ../../overlay.nix)]; };
|
||||||
|
Loading…
Reference in New Issue
Block a user