chore(gs/achilles): Integrate with the depot build

Get achilles building in Nix as part of the depot's build tree. This
involved making it work with stable rust, since the depot only exposes
stable rust to sub-packages, which turned out to be fairly
straightforward.

Also adds libffi as a new top-level expose, since it's required to build achilles

Change-Id: I5f6dedb26c0b81ec258aedde1973e74903c07ece
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2612
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2021-03-19 19:43:59 -04:00 committed by glittershark
parent d031ec0234
commit b1c4b84dba
5 changed files with 32 additions and 10 deletions

View file

@ -165,9 +165,16 @@ named!(bool_(&str) -> Literal, alt!(
));
fn string_internal(i: &str) -> nom::IResult<&str, Cow<'_, str>, nom::error::Error<&str>> {
let (s, rem) = i
.split_once('"')
.ok_or_else(|| nom::Err::Error(nom::error::Error::new(i, nom::error::ErrorKind::Tag)))?;
// TODO(grfn): use String::split_once when that's stable
let (s, rem) = if let Some(pos) = i.find('"') {
(&i[..pos], &i[(pos + 1)..])
} else {
return Err(nom::Err::Error(nom::error::Error::new(
i,
nom::error::ErrorKind::Tag,
)));
};
Ok((rem, Cow::Borrowed(s)))
}