about summary refs log tree commit diff
path: root/pkgs/applications/networking/nym/default.nix
blob: ee60c6b65901deaeb46195b37716305554dbe294 (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
{ stdenv
, lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, Security
, libiconv
}:

rustPlatform.buildRustPackage rec {
  pname = "nym";
  version = "0.11.0";

  src = fetchFromGitHub {
    owner = "nymtech";
    repo = "nym";
    rev = "v${version}";
    sha256 = "sha256-bZXbteryXkOxft63zUMWdpBgbDSvrBHQY3f70/+mBtI=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "sphinx-0.1.0" = "sha256-/NW6jHZIi2Pe/m6o86FR0pLsSuRVuLYNTTPU7JEf/Us=";
    };
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];

  checkType = "debug";

  passthru.updateScript = ./update.sh;

  checkFlags = [
    "--skip commands::upgrade::upgrade_tests"
    "--skip allowed_hosts::tests::creating_a_new_host_store"
    "--skip allowed_hosts::tests::getting_the_domain_root"
    "--skip allowed_hosts::tests::requests_to_allowed_hosts"
    "--skip allowed_hosts::tests::requests_to_unknown_hosts"
  ];

  meta = with lib; {
    description = "A mixnet providing IP-level privacy";
    longDescription = ''
      Nym routes IP packets through other participating nodes to hide their source and destination.
      In contrast with Tor, it prevents timing attacks at the cost of latency.
    '';
    homepage = "https://nymtech.net";
    license = licenses.asl20;
    maintainers = [ maintainers.ehmry ];
    platforms = platforms.all;
  };
}