nixpkgs/pkgs/by-name/ny/nym/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
2.4 KiB
Nix
Raw Normal View History

2024-10-03 09:30:28 +00:00
{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
darwin,
nix-update-script,
rustc,
2020-04-11 20:04:24 +00:00
}:
2024-10-03 09:30:28 +00:00
rustPlatform.buildRustPackage rec {
2020-04-11 20:04:24 +00:00
pname = "nym";
2024-10-03 09:30:28 +00:00
version = "1.1.21";
2020-04-11 20:04:24 +00:00
src = fetchFromGitHub {
owner = "nymtech";
repo = "nym";
2023-06-19 11:14:56 +00:00
rev = "nym-binaries-v${version}";
2024-10-03 09:30:28 +00:00
hash = "sha256-VM0Pc5qyrsn9wV3mfvrAlCfm/rIf3cednZzFtJCT+no=";
2020-04-11 20:04:24 +00:00
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
2023-06-19 11:14:56 +00:00
"bls12_381-0.6.0" = "sha256-sIZy+CTASP+uiY10nP/N4WfCLjeqkjiNl/FzO0p5WdI=";
"cosmos-sdk-proto-0.12.3" = "sha256-ekQ9JA6WaTkvHkBKJbYPzfmx6I7LZnhIPiHsZFAP90w=";
"rocket_cors-0.5.2" = "sha256-hfk5gKtc94g+VZmm+S6HKvg+E71QVKQTK2E3K2MCvz0=";
"wasm-timer-0.2.5" = "sha256-od+r3ttFpFhcIh8rPQJQARaQLsbLeEZpCY1h9c4gow8=";
};
};
2020-04-11 20:04:24 +00:00
2023-06-19 11:14:56 +00:00
postPatch = ''
substituteInPlace contracts/vesting/build.rs \
--replace 'vergen(config).expect("failed to extract build metadata")' '()'
substituteInPlace common/bin-common/build.rs \
--replace 'vergen(config).expect("failed to extract build metadata")' '()'
'';
2024-10-03 09:30:28 +00:00
nativeBuildInputs = [
pkg-config
];
2020-04-11 20:04:24 +00:00
2024-10-03 09:30:28 +00:00
buildInputs =
[
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
Security
CoreServices
]);
2020-04-11 20:04:24 +00:00
checkType = "debug";
2023-06-19 11:14:56 +00:00
passthru.updateScript = nix-update-script { };
2020-04-11 20:04:24 +00:00
checkFlags = [
2023-06-19 11:14:56 +00:00
"--skip=commands::upgrade::upgrade_tests"
"--skip=allowed_hosts::filter::tests::creating_a_new_host_store"
"--skip=allowed_hosts::filter::tests::getting_the_domain_root"
"--skip=allowed_hosts::filter::tests::requests_to_allowed_hosts"
"--skip=allowed_hosts::filter::tests::requests_to_unknown_hosts"
"--skip=ping::http::tests::resolve_host_with_valid_hostname_returns_some"
];
2023-06-19 11:14:56 +00:00
env = {
VERGEN_BUILD_TIMESTAMP = "0";
VERGEN_BUILD_SEMVER = version;
VERGEN_GIT_SHA = hash;
VERGEN_GIT_COMMIT_TIMESTAMP = "0";
VERGEN_GIT_BRANCH = "master";
VERGEN_RUSTC_SEMVER = rustc.version;
VERGEN_RUSTC_CHANNEL = "stable";
VERGEN_CARGO_PROFILE = "release";
};
2024-10-03 09:30:28 +00:00
meta = {
2020-04-11 20:04:24 +00:00
description = "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";
2024-10-03 09:30:28 +00:00
license = lib.licenses.asl20;
platforms = lib.platforms.all;
2020-04-11 20:04:24 +00:00
};
}