3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/ipfs-cluster/default.nix

42 lines
1,012 B
Nix
Raw Normal View History

2018-08-30 22:06:50 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx, gx-go }:
buildGoPackage rec {
name = "ipfs-cluster-${version}";
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 {
inherit name src;
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
};
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}
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 ];
};
}