1 { lib, stdenv, fetchFromGitHub, rustPlatform, darwin }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
10 rev = "boringtun-cli-${version}";
11 sha256 = "sha256-PY7yqBNR4CYh8Y/vk4TYxxJnnv0eig8sjXp4dR4CX04=";
14 cargoHash = "sha256-WFKlfuZGVU5KA57ZYjsIrIwE4B5TeaU5IKt9BNEnWyY=";
16 buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security;
18 # Testing this project requires sudo, Docker and network access, etc.
22 description = "Userspace WireGuard® implementation in Rust";
23 homepage = "https://github.com/cloudflare/boringtun";
24 license = licenses.bsd3;
25 maintainers = with maintainers; [ xrelkd ];
26 platforms = platforms.linux ++ platforms.darwin;
27 mainProgram = "boringtun-cli";