diff options
Diffstat (limited to 'third_party/josh/default.nix')
-rw-r--r-- | third_party/josh/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/third_party/josh/default.nix b/third_party/josh/default.nix new file mode 100644 index 000000000000..45c8420e96e7 --- /dev/null +++ b/third_party/josh/default.nix @@ -0,0 +1,37 @@ +# https://github.com/josh-project/josh +{ depot, pkgs, ... }: + +let + # TODO(sterni): switch to pkgs.josh as soon as that commit is released + rev = "fc857afda2c1536234e3bb1983c518a1abf63d25"; + src = pkgs.fetchFromGitHub { + owner = "josh-project"; + repo = "josh"; + inherit rev; + hash = "sha256:16ch7al7xfyjipgqh2n7grj985fv713mhi8y5bixb736vsad9q3w"; + }; +in +depot.third_party.naersk.buildPackage { + inherit src; + JOSH_VERSION = "git-${builtins.substring 0 8 rev}"; + + buildInputs = with pkgs; [ + libgit2 + openssl + pkg-config + ]; + + cargoBuildOptions = x: x ++ [ + "-p" + "josh-filter" + "-p" + "josh-proxy" + ]; + + overrideMain = x: { + nativeBuildInputs = (x.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ]; + postInstall = '' + wrapProgram $out/bin/josh-proxy --prefix PATH : "${pkgs.git}/bin" + ''; + }; +} |