on <installing tools> — there seems to be a couple...
# general
f
on installing tools — there seems to be a couple of options where pex seems to use some internals;
There is a predefined rule to go from PexProcess -> Process, so Get(ProcessResult, Process) will cause the engine to run PexProcess -> Process -> ProcessResult.
is it possible to create your own external tool installer which runs a specific command to get the environment correctly setup, similar to the pex machinery and
PexRequest
/
PexProcess
?
h
Yep for sure! See
GoSdkProcess
for example. You basically define a (data)class that has all the values you want your rules to give, and then write a helper rule going from
MyCustomProcess -> Process
. That's it
f
oh — that sounds — easy enough, thank you for the pointer!
h
Out of curiosity, what tool do you want to support?
Also the "install via this tool" part is usually modeled as a different set of helper types and rules. That would be the
Get(Pex, PexRequest)
stuff for example. Often that is used to form part of the
input_digest
for the
MyCustomProcess
part. In other words, one step is a) how do I install this tool?, and then b) how do I invoke this tool in a Process?
f
yup! got it — this is for my
nix
spelunking :)
🙌 1