mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
46420bbaa3
treewide replacement of stdenv.mkDerivation rec { name = "*-${version}"; version = "*"; to pname
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx, gx-go }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "ipfs-cluster";
|
|
version = "0.9.0";
|
|
rev = "v${version}";
|
|
|
|
goPackagePath = "github.com/ipfs/ipfs-cluster";
|
|
|
|
extraSrcPaths = [
|
|
(fetchgx {
|
|
inherit src;name = "${pname}-${version}";
|
|
sha256 = "1k7xcirvi07p5g9gr9jcx5h39wk7jxfsyjrn5yraa8xdqhn6b6nx";
|
|
})
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ipfs";
|
|
repo = "ipfs-cluster";
|
|
inherit rev;
|
|
sha256 = "1bxwcp0355f1ykjcidbxv218zp9d20nma7lnpn9xcjqc8vaq03kn";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|
|
|