nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix

29 lines
794 B
Nix
Raw Normal View History

2021-01-17 03:51:22 +00:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, libsodium, Security }:
2019-03-02 00:59:49 +00:00
rustPlatform.buildRustPackage rec {
pname = "shadowsocks-rust";
2020-11-04 04:20:00 +00:00
version = "1.8.23";
2019-03-02 00:59:49 +00:00
src = fetchFromGitHub {
rev = "v${version}";
owner = "shadowsocks";
repo = pname;
2020-11-04 04:20:00 +00:00
sha256 = "1ylasv33478cgwmr8wrd4705azfzrw495w629ncynamv7z17w3k3";
2019-03-02 00:59:49 +00:00
};
2020-11-04 04:20:00 +00:00
cargoSha256 = "060k2dil38bx4zb5nnkr3mj6aayginbhr3aqjv0h071q0vlvp05p";
2020-05-15 10:20:00 +01:00
SODIUM_USE_PKG_CONFIG = 1;
2019-03-02 00:59:49 +00:00
buildInputs = [ openssl libsodium ]
2021-01-15 09:19:50 +00:00
++ lib.optionals stdenv.isDarwin [ Security ];
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ pkg-config ];
2019-03-02 00:59:49 +00:00
meta = with lib; {
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 ];
};
}