nixpkgs/pkgs/applications/networking/ipfs-cluster/default.nix

42 lines
1012 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}";
2018-11-20 12:31:28 +00:00
version = "0.7.0";
2018-08-30 22:06:50 +01:00
rev = "v${version}";
goPackagePath = "github.com/ipfs/ipfs-cluster";
extraSrcPaths = [
(fetchgx {
inherit name src;
2018-11-20 12:31:28 +00:00
sha256 = "19ljx4q9msrv5wwyd85l01l320lhwgma5z3b756ldgj9fs8p9ph6";
2018-08-30 22:06:50 +01:00
})
];
src = fetchFromGitHub {
owner = "ipfs";
repo = "ipfs-cluster";
inherit rev;
2018-11-20 12:31:28 +00:00
sha256 = "1zqy4zzi33z16fny1dnhqa8z7czrggvbxdxs750gxzbnd9vqzda1";
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 ];
};
}