8222b40d66
It seems our currently pinned josh commit doesn't seem to support pushing back, and just timeouts when trying to do so. Bump to the latest head, let's see how it works out there. We don't need to pull a more recent rustc, as the nixpkgs rustc seems to be recent enough. Change-Id: I4f6d775df4db13a4537049292edfe969d2bb45ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/9590 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
# https://github.com/josh-project/josh
|
|
{ depot, pkgs, ... }:
|
|
|
|
let
|
|
# TODO(sterni): switch to pkgs.josh as soon as that commit is released
|
|
rev = "1586eab06284ce668779c87f00a1fb5fa9763be0";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "josh-project";
|
|
repo = "josh";
|
|
inherit rev;
|
|
hash = "sha256-94QrHcVHiEMCpBZJ5sghwtVNLNm4gdG8X85OetoGRD0=";
|
|
};
|
|
|
|
|
|
naersk = pkgs.callPackage depot.third_party.sources.naersk {
|
|
inherit (pkgs) rustc cargo;
|
|
};
|
|
version = "git-${builtins.substring 0 8 rev}";
|
|
in
|
|
naersk.buildPackage {
|
|
pname = "josh";
|
|
inherit src version;
|
|
JOSH_VERSION = version;
|
|
|
|
buildInputs = with pkgs; [
|
|
libgit2
|
|
openssl
|
|
pkg-config
|
|
];
|
|
|
|
dontStrip = true;
|
|
cargoBuildOptions = x: x ++ [
|
|
"-p"
|
|
"josh-filter"
|
|
"-p"
|
|
"josh-proxy"
|
|
];
|
|
|
|
overrideMain = x: {
|
|
preBuild = x.preBuild or "" + ''
|
|
echo 'debug = true' >> Cargo.toml
|
|
'';
|
|
|
|
nativeBuildInputs = (x.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
|
postInstall = ''
|
|
wrapProgram $out/bin/josh-proxy --prefix PATH : "${pkgs.git}/bin"
|
|
'';
|
|
};
|
|
}
|