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

29 lines
801 B
Nix
Raw Normal View History

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