feat(3p/josh): Import and build josh

We've had josh in here previously, but it was kind of immature back
then. The repository looks much better now and I'd like to give it
another try.

Josh is a Rust project, the build here is done with naersk.

Change-Id: I3731340d00ce1eb4cef55de114e1915579e47ef3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3017
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2021-04-15 16:45:51 +02:00 committed by tazjin
parent 07c9c72347
commit 377de6afdc
2 changed files with 95 additions and 0 deletions

33
third_party/josh/default.nix vendored Normal file
View file

@ -0,0 +1,33 @@
# https://github.com/esrlabs/josh
{ depot, pkgs, ... }:
let
gitSrc = pkgs.fetchFromGitHub {
owner = "esrlabs";
repo = "josh";
rev = "1c1965deb0278de92452a597c092f16b531274ae";
sha256 = "0a0ybx4dqr9gfcn1kqy2nirdsfbdwkfz24ljnri564c5381ccldw";
};
src = pkgs.applyPatches {
name = "josh-src";
src = gitSrc;
patches = [
./pin-git2-rev.patch
];
};
in depot.third_party.naersk.buildPackage {
inherit src;
buildInputs = with pkgs; [
libgit2
openssl
pkgconfig
];
cargoBuildOptions = x: x ++ [
"-p" "josh"
"-p" "josh-proxy"
"-p" "josh-ui"
];
}