summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-09-02 13:52:48 +0200
committerGitHub <noreply@github.com>2018-09-02 13:52:48 +0200
commit6a7cd7888471509a0744e7a764773d605ea3c6c5 (patch)
treea2519b547ec3bc8c625b6b209b6741c77498100b /pkgs/applications
parent4d3ed9f5d56179e75999371b0df4b4db73b68249 (diff)
parent314d1fcdcb5b8602d634beaf577757ee5e8b6aee (diff)
downloadnixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar.gz
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar.bz2
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar.lz
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar.xz
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.tar.zst
nixlib-6a7cd7888471509a0744e7a764773d605ea3c6c5.zip
Merge pull request #45818 from jglukasik/master
ipfs-cluster: init at v0.5.0
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/ipfs-cluster/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/networking/ipfs-cluster/default.nix b/pkgs/applications/networking/ipfs-cluster/default.nix
new file mode 100644
index 000000000000..33b9f6151399
--- /dev/null
+++ b/pkgs/applications/networking/ipfs-cluster/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx, gx-go }:
+
+buildGoPackage rec {
+  name = "ipfs-cluster-${version}";
+  version = "0.5.0";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/ipfs/ipfs-cluster";
+
+  extraSrcPaths = [
+    (fetchgx {
+      inherit name src;
+      sha256 = "0jwz3kd07i5fs0sxds80j8d338skhgxgxra377qxsk0cr2hhj2vm";
+    })
+  ];
+
+  src = fetchFromGitHub {
+    owner = "ipfs";
+    repo = "ipfs-cluster";
+    inherit rev;
+    sha256 = "132whjyplcifq8747hcdrgbc0amhp618dg049jq5nyslcxfgdypm";
+  };
+
+  nativeBuildInputs = [ gx-go ];
+
+  preBuild = ''
+    # fetchgx stores packages by their ipfs hash
+    # this will rewrite github.com/ imports to gx/ipfs/
+    cd go/src/${goPackagePath}
+    gx-go rewrite
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Allocate, replicate, and track Pins across a cluster of IPFS daemons";
+    homepage = https://cluster.ipfs.io/;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ jglukasik ];
+  };
+}
+