2021-01-25 08:26:54 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub
|
2019-04-07 13:29:30 +01:00
|
|
|
, libsodium, openssl
|
2021-01-17 03:51:22 +00:00
|
|
|
, pkg-config
|
2019-04-07 13:29:30 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "tox-node";
|
2020-10-07 21:37:19 +01:00
|
|
|
version = "0.1.0";
|
2019-04-07 13:29:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tox-rs";
|
|
|
|
repo = "tox-node";
|
|
|
|
rev = "v${version}";
|
2020-10-07 21:37:19 +01:00
|
|
|
sha256 = "0bar42nigjwn7dq48rmg74sm3gnfqvb6gnd9g1n0i8nmynd00wvn";
|
2019-04-07 13:29:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libsodium openssl ];
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-04-07 13:29:30 +01:00
|
|
|
|
|
|
|
SODIUM_USE_PKG_CONFIG = "yes";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2020-03-20 06:47:12 +00:00
|
|
|
install -D $releaseDir/tox-node $out/bin/tox-node
|
2019-04-07 13:29:30 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-10-07 21:37:19 +01:00
|
|
|
cargoSha256 = "087ccb824hmmxmnn5c2bzww2q888a8zy6y7rwgsdfr8rbay2c909";
|
2019-04-07 13:29:30 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-04-07 13:29:30 +01:00
|
|
|
description = "A server application to run tox node written in pure Rust";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/tox-rs/tox-node";
|
2020-10-07 21:37:19 +01:00
|
|
|
license = [ licenses.gpl3Plus ];
|
2019-04-07 13:29:30 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ suhr ];
|
|
|
|
};
|
|
|
|
}
|