From 3242b3da525a0902746ddd3918bd4bbbfa0e9702 Mon Sep 17 00:00:00 2001 From: Patrick Ferris Date: Sat, 6 Jul 2024 19:54:51 +0100 Subject: [PATCH] Expose run_input --- lib/build.ml | 2 +- lib/s.ml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/build.ml b/lib/build.ml index 0f80e123..b7f8b9d4 100644 --- a/lib/build.ml +++ b/lib/build.ml @@ -71,7 +71,7 @@ module Make (Raw_store : S.STORE) (Sandbox : S.SANDBOX) (Fetch : S.FETCHER) = st network : string list; mount_secrets : Config.Secret.t list; rom : Obuilder_spec.Rom.t list; - } [@@deriving sexp_of] + } [@@deriving sexp] let run t ~switch ~log ~cache run_input = let input = sexp_of_run_input run_input in diff --git a/lib/s.ml b/lib/s.ml index b0f7780d..b77abd43 100644 --- a/lib/s.ml +++ b/lib/s.ml @@ -1,6 +1,6 @@ open Sexplib.Std -type id = string [@@deriving sexp_of] +type id = string [@@deriving sexp] type tag = [ | `Heading (** Introduces a new build step *) @@ -10,6 +10,18 @@ type tag = [ type logger = tag -> string -> unit +type run_input = { + base : id; + workdir : string; + user : Obuilder_spec.user; + env : Config.env; + cmd : string; + shell : string list; + network : string list; + mount_secrets : Config.Secret.t list; + rom : Obuilder_spec.Rom.t list; +} [@@deriving sexp] + module type STORE = sig type t