nixpkgs/pkgs/applications/networking/nym/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

51 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, libredirect
, writeText
}:
rustPlatform.buildRustPackage rec {
pname = "nym";
version = "0.8.1";
src = fetchFromGitHub {
owner = "nymtech";
repo = "nym";
rev = "v${version}";
sha256 = "0wzk9qzjyax73lfjbbag412vw1fgk2wmhhry5hdlvdbkim42m5bn";
};
# 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";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
checkType = "debug";
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 ];
platforms = with platforms; intersectLists (linux ++ darwin) (concatLists [ x86 x86_64 aarch64 arm ]);
};
}