nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix
2021-01-15 17:12:36 +07:00

29 lines
792 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, libsodium, Security }:
rustPlatform.buildRustPackage rec {
pname = "shadowsocks-rust";
version = "1.8.23";
src = fetchFromGitHub {
rev = "v${version}";
owner = "shadowsocks";
repo = pname;
sha256 = "1ylasv33478cgwmr8wrd4705azfzrw495w629ncynamv7z17w3k3";
};
cargoSha256 = "060k2dil38bx4zb5nnkr3mj6aayginbhr3aqjv0h071q0vlvp05p";
SODIUM_USE_PKG_CONFIG = 1;
buildInputs = [ openssl libsodium ]
++ lib.optionals stdenv.isDarwin [ Security ];
nativeBuildInputs = [ pkgconfig ];
meta = with lib; {
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
description = "A Rust port of shadowsocks";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}