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-02-28 13:17:08 +01:00
|
|
|
rev = "fc857afda2c1536234e3bb1983c518a1abf63d25";
|
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;
|
|
|
|
hash = "sha256:16ch7al7xfyjipgqh2n7grj985fv713mhi8y5bixb736vsad9q3w";
|
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
|
|
|
}
|