about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/p2p/lokinet/default.nix
blob: f77323d2bcf61b9b70c52c03dff8de51f16cb35a (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ stdenv
, lib
, fetchFromGitHub
, cmake
, libevent
, libsodium
, libuv
, nlohmann_json
, pkg-config
, spdlog
, fmt_9
, sqlite
, systemd
, unbound
, zeromq
}:
let
  # Upstream has received reports of incompatibilities with fmt, and other
  # dependencies, see: https://github.com/oxen-io/lokinet/issues/2200.
  spdlog' = spdlog.override {
    fmt = fmt_9;
  };

in stdenv.mkDerivation rec {
  pname = "lokinet";
  version = "0.9.11";

  src = fetchFromGitHub {
    owner = "oxen-io";
    repo = "lokinet";
    rev = "refs/tags/v${version}";
    fetchSubmodules = true;
    hash = "sha256-aVFLDGTbRUOw2XWDpl+ojwHBG7c0miGeoKMLwMpqVtg=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    libevent
    libuv
    libsodium
    nlohmann_json
    spdlog'
    sqlite
    systemd
    unbound
    zeromq
  ];

  cmakeFlags = [
    "-DGIT_VERSION=v${version}"
    "-DWITH_BOOTSTRAP=OFF" # we provide bootstrap files manually
    "-DWITH_SETCAP=OFF"
  ];

  meta = with lib; {
    description = "Anonymous, decentralized and IP based overlay network for the internet";
    homepage = "https://lokinet.org/";
    changelog = "https://github.com/oxen-io/lokinet/releases/tag/v${version}";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ wyndon ];
  };
}