2018-08-30 22:06:50 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx, gx-go }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ipfs-cluster";
|
2019-03-02 01:06:59 +00:00
|
|
|
version = "0.9.0";
|
2018-08-30 22:06:50 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/ipfs/ipfs-cluster";
|
|
|
|
|
|
|
|
extraSrcPaths = [
|
|
|
|
(fetchgx {
|
2019-08-15 13:41:18 +01:00
|
|
|
inherit src;name = "${pname}-${version}";
|
2019-03-02 01:06:59 +00:00
|
|
|
sha256 = "1k7xcirvi07p5g9gr9jcx5h39wk7jxfsyjrn5yraa8xdqhn6b6nx";
|
2018-08-30 22:06:50 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ipfs";
|
|
|
|
repo = "ipfs-cluster";
|
|
|
|
inherit rev;
|
2019-03-02 01:06:59 +00:00
|
|
|
sha256 = "1bxwcp0355f1ykjcidbxv218zp9d20nma7lnpn9xcjqc8vaq03kn";
|
2018-08-30 22:06:50 +01:00
|
|
|
};
|
|
|
|
|
2018-09-02 00:01:43 +01:00
|
|
|
nativeBuildInputs = [ gx-go ];
|
|
|
|
|
2018-08-30 22:06:50 +01:00
|
|
|
preBuild = ''
|
|
|
|
# fetchgx stores packages by their ipfs hash
|
|
|
|
# this will rewrite github.com/ imports to gx/ipfs/
|
|
|
|
cd go/src/${goPackagePath}
|
2018-09-02 00:01:43 +01:00
|
|
|
gx-go rewrite
|
2018-08-30 22:06:50 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|