summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ip/ipfs-cluster/package.nix
blob: 401e224b57a66b3e342f5f92e80f66d8d74cc2ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  buildGoModule,
  fetchFromGitHub,
}:

buildGoModule (finalAttrs: {
  pname = "ipfs-cluster";
  version = "1.1.6";

  vendorHash = "sha256-j8eMvlmTd0SIZD/8up7wCRZkSRxDBM0coVJIKydfXhg=";

  src = fetchFromGitHub {
    owner = "ipfs-cluster";
    repo = "ipfs-cluster";
    rev = "v${finalAttrs.version}";
    hash = "sha256-d0lFvxYwJXV6RtI3mDjDwCrD5DUOYWq3aOZv7tNZnBE=";
  };

  checkFlags =
    let
      skippedTests = [
        # Flaky test, sometimes fails with:
        # --- FAIL: TestClustersPeerAddInUnhealthyCluster (7.58s)
        #     peer_manager_test.go:247: failed to dial: failed to dial QmSookyjcPhxchnHeo2jtssHqe8zdmhgEQiY61yUcWjWp5: all dials failed
        #           * [/ip4/127.0.0.1/tcp/46571] dial backoff
        "TestClustersPeerAddInUnhealthyCluster"
      ];
    in
    [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];

  __darwinAllowLocalNetworking = true; # required for tests

  meta = {
    description = "Allocate, replicate, and track Pins across a cluster of IPFS daemons";
    homepage = "https://ipfscluster.io";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      Luflosi
      jglukasik
    ];
  };
})