2020-04-11 22:04:24 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2020-04-11 22:04:24 +02:00
|
|
|
, openssl
|
|
|
|
, libredirect
|
|
|
|
, writeText
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nym";
|
2020-10-26 22:00:25 +01:00
|
|
|
version = "0.8.1";
|
2020-04-11 22:04:24 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nymtech";
|
|
|
|
repo = "nym";
|
|
|
|
rev = "v${version}";
|
2020-10-26 22:00:25 +01:00
|
|
|
sha256 = "0wzk9qzjyax73lfjbbag412vw1fgk2wmhhry5hdlvdbkim42m5bn";
|
2020-04-11 22:04:24 +02:00
|
|
|
};
|
|
|
|
|
2020-10-26 22:00:25 +01:00
|
|
|
# fix outdated Cargo.lock
|
|
|
|
cargoPatches = [ (writeText "fix-nym-cargo-lock.patch" ''
|
|
|
|
--- a/Cargo.lock
|
|
|
|
+++ b/Cargo.lock
|
|
|
|
@@ -1826 +1826 @@
|
|
|
|
-version = "0.8.0"
|
|
|
|
+version = "0.8.1"
|
|
|
|
'') ];
|
|
|
|
|
|
|
|
cargoSha256 = "0zr5nzmglmvn6xfqgvipbzy8nw5cl3nf7zjmghkqdwi6zj9p9272";
|
2020-04-11 22:04:24 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-11 22:04:24 +02:00
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-05-13 22:19:16 +02:00
|
|
|
checkType = "debug";
|
|
|
|
|
2020-04-11 22:04:24 +02:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
|
|
|
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 ];
|
2020-06-07 20:32:28 +02:00
|
|
|
platforms = with platforms; intersectLists (linux ++ darwin) (concatLists [ x86 x86_64 aarch64 arm ]);
|
2020-04-11 22:04:24 +02:00
|
|
|
};
|
|
|
|
}
|