2023-02-28 13:17:08 +01:00
|
|
|
# https://github.com/josh-project/josh
|
2021-04-15 16:45:51 +02:00
|
|
|
{ depot, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2023-03-24 14:33:38 +01:00
|
|
|
# TODO(sterni): switch to pkgs.josh as soon as that commit is released
|
2023-06-30 22:44:22 +02:00
|
|
|
rev = "c0a170a756dd5e63268673086218c0ce7bf18bdc";
|
2021-05-02 16:37:23 +02:00
|
|
|
src = pkgs.fetchFromGitHub {
|
2023-02-28 13:17:08 +01:00
|
|
|
owner = "josh-project";
|
2021-04-15 16:45:51 +02:00
|
|
|
repo = "josh";
|
2023-02-28 13:17:08 +01:00
|
|
|
inherit rev;
|
2023-06-30 22:44:22 +02:00
|
|
|
hash = "sha256:0rsf65fq9xm3qj77ig3s4wmmgm50jhvwrknr839hipjj5lj4x1hp";
|
2021-04-15 16:45:51 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
depot.third_party.naersk.buildPackage {
|
|
|
|
inherit src;
|
2023-02-28 13:17:08 +01:00
|
|
|
JOSH_VERSION = "git-${builtins.substring 0 8 rev}";
|
2021-04-15 16:45:51 +02:00
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
libgit2
|
|
|
|
openssl
|
2022-09-26 19:33:05 +02:00
|
|
|
pkg-config
|
2021-04-15 16:45:51 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
cargoBuildOptions = x: x ++ [
|
|
|
|
"-p"
|
2023-02-28 13:17:08 +01:00
|
|
|
"josh-filter"
|
2021-04-15 16:45:51 +02:00
|
|
|
"-p"
|
|
|
|
"josh-proxy"
|
|
|
|
];
|
2022-02-11 11:17:35 +01:00
|
|
|
|
|
|
|
overrideMain = x: {
|
2022-02-09 15:12:04 +01:00
|
|
|
nativeBuildInputs = (x.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/josh-proxy --prefix PATH : "${pkgs.git}/bin"
|
|
|
|
'';
|
2022-02-11 11:17:35 +01:00
|
|
|
};
|
2021-04-15 16:45:51 +02:00
|
|
|
}
|