2019-03-02 00:59:49 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, libsodium, Security }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "shadowsocks-rust";
|
2020-05-15 10:20:00 +01:00
|
|
|
version = "1.8.11";
|
2019-03-02 00:59:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2020-05-15 10:20:00 +01:00
|
|
|
sha256 = "0imnvx3v0msk9qf72zy1qg5q52dmc8xfs9iwdwa2q13scjslgmwn";
|
2019-03-02 00:59:49 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 10:20:00 +01:00
|
|
|
cargoSha256 = "1aqqx0pdq3vp5c06pjwsrbrqfkz5dhxnpvv3vnr3pqfm62xrffgg";
|
|
|
|
|
|
|
|
SODIUM_USE_PKG_CONFIG = 1;
|
2019-03-02 00:59:49 +00:00
|
|
|
|
|
|
|
buildInputs = [ openssl libsodium ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
2019-03-02 00:59:49 +00:00
|
|
|
description = "A Rust port of shadowsocks";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|