about summary refs log tree commit diff
path: root/third_party/josh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/josh/default.nix')
-rw-r--r--third_party/josh/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/third_party/josh/default.nix b/third_party/josh/default.nix
new file mode 100644
index 0000000000..a7e4b30b8e
--- /dev/null
+++ b/third_party/josh/default.nix
@@ -0,0 +1,33 @@
+# https://github.com/esrlabs/josh
+{ depot, pkgs, ... }:
+
+let
+  gitSrc = pkgs.fetchFromGitHub {
+    owner = "esrlabs";
+    repo = "josh";
+    rev = "1c1965deb0278de92452a597c092f16b531274ae";
+    sha256 = "0a0ybx4dqr9gfcn1kqy2nirdsfbdwkfz24ljnri564c5381ccldw";
+  };
+
+  src = pkgs.applyPatches {
+    name = "josh-src";
+    src = gitSrc;
+    patches = [
+      ./pin-git2-rev.patch
+    ];
+  };
+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"
+  ];
+}