2021-12-14 04:51:48 +01:00
|
|
|
{ pkgs, depot, ... }:
|
2020-08-21 12:12:57 +02:00
|
|
|
|
|
|
|
let
|
2020-08-31 02:16:31 +02:00
|
|
|
inherit (builtins) fetchGit path toJSON;
|
2021-12-14 04:51:48 +01:00
|
|
|
inherit (depot.users.wpcarro.emacs) initEl runScript;
|
2020-08-31 02:16:31 +02:00
|
|
|
|
|
|
|
elispLintSrc = fetchGit {
|
2020-08-27 19:27:12 +02:00
|
|
|
url = "https://github.com/gonewest818/elisp-lint";
|
|
|
|
rev = "2b645266be8010a6a49c6d0ebf6a3ad5bd290ff4";
|
|
|
|
};
|
|
|
|
|
2020-08-21 12:12:57 +02:00
|
|
|
pipeline.steps = [
|
2020-08-22 10:09:15 +02:00
|
|
|
{
|
|
|
|
key = "lint-secrets";
|
|
|
|
command = "${pkgs.git-secrets}/bin/git-secrets --scan-history";
|
|
|
|
label = ":broom: lint secrets";
|
|
|
|
}
|
2020-08-21 12:12:57 +02:00
|
|
|
{
|
2020-08-21 19:40:30 +02:00
|
|
|
key = "build-briefcase";
|
2020-08-31 01:48:30 +02:00
|
|
|
command = ''
|
|
|
|
nix-build . -I briefcase="$(pwd)" --no-out-link --show-trace
|
|
|
|
'';
|
2020-08-21 19:40:30 +02:00
|
|
|
label = ":nix: build briefcase";
|
2020-08-22 10:09:15 +02:00
|
|
|
depends_on = "lint-secrets";
|
2020-08-21 19:40:30 +02:00
|
|
|
}
|
2020-08-27 19:27:12 +02:00
|
|
|
{
|
|
|
|
key = "init-emacs";
|
2020-08-31 02:16:31 +02:00
|
|
|
command = let
|
|
|
|
scriptEl = path {
|
|
|
|
path = ./script.el;
|
|
|
|
name = "script.el";
|
|
|
|
};
|
|
|
|
runScriptEl = runScript {
|
|
|
|
script = scriptEl;
|
|
|
|
briefcasePath = "$(pwd)";
|
|
|
|
};
|
|
|
|
in "${runScriptEl} ${initEl}";
|
2020-08-27 19:27:12 +02:00
|
|
|
label = ":gnu: initialize Emacs";
|
|
|
|
depends_on = "build-briefcase";
|
|
|
|
}
|
2020-08-21 19:40:30 +02:00
|
|
|
{
|
|
|
|
key = "build-socrates";
|
2020-08-21 12:12:57 +02:00
|
|
|
command = ''
|
|
|
|
nix-build '<nixpkgs/nixos>' \
|
|
|
|
-I briefcase="$(pwd)" \
|
|
|
|
-I nixpkgs=/var/lib/buildkite-agent-socrates/nixpkgs-channels \
|
|
|
|
-I nixos-config=nixos/socrates/default.nix \
|
|
|
|
-A system \
|
|
|
|
--no-out-link \
|
|
|
|
--show-trace
|
|
|
|
'';
|
2020-08-21 19:40:30 +02:00
|
|
|
label = ":nix: build socrates";
|
|
|
|
depends_on = "build-briefcase";
|
2020-08-21 12:12:57 +02:00
|
|
|
}
|
|
|
|
];
|
2020-08-31 02:16:31 +02:00
|
|
|
in pkgs.writeText "pipeline.yaml" (toJSON pipeline)
|