a438f81964
josh-proxy calls git at runtime and needs to have it available Change-Id: Ifccc6879cc5911060c7e6681c202fe5e8c2f5440 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5269 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: grfn <grfn@gws.fyi>
38 lines
800 B
Nix
38 lines
800 B
Nix
# https://github.com/esrlabs/josh
|
|
{ depot, pkgs, ... }:
|
|
|
|
let
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "esrlabs";
|
|
repo = "josh";
|
|
rev = "effe6290559136faba5591a115e56c2b30210329";
|
|
hash = "sha256:0kam9rqjk96brvh15wj3h3vm2sqnr5pckz91az2ida5617d5gp9v";
|
|
};
|
|
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"
|
|
];
|
|
|
|
overrideMain = x: {
|
|
patches = [ ./0001-josh-proxy-Always-require-authentication-when-pushin.patch ];
|
|
|
|
nativeBuildInputs = (x.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
|
postInstall = ''
|
|
wrapProgram $out/bin/josh-proxy --prefix PATH : "${pkgs.git}/bin"
|
|
'';
|
|
};
|
|
}
|