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

29 lines
801 B
Nix
Raw Normal View History

{ 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 ]
++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
nativeBuildInputs = [ pkgconfig ];
meta = with stdenv.lib; {
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
description = "A Rust port of shadowsocks";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}