summary refs log tree commit diff
path: root/pkgs/tools/networking/boringtun
diff options
context:
space:
mode:
authorxrelkd <46590321+xrelkd@users.noreply.github.com>2019-04-12 17:25:26 +0800
committerxrelkd <46590321+xrelkd@users.noreply.github.com>2019-04-13 10:38:04 +0800
commit6ad4a95654cb0a8ab909067153ea263cc2ca4025 (patch)
treeed9f370614efef54e0000d11e74f66fc7d660c98 /pkgs/tools/networking/boringtun
parent917a7fa1cb2b5fdd028cc4b2955e7bb0eec5075a (diff)
downloadnixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar.gz
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar.bz2
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar.lz
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar.xz
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.tar.zst
nixpkgs-6ad4a95654cb0a8ab909067153ea263cc2ca4025.zip
boringtun: init at 20190407
Diffstat (limited to 'pkgs/tools/networking/boringtun')
-rw-r--r--pkgs/tools/networking/boringtun/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/networking/boringtun/default.nix b/pkgs/tools/networking/boringtun/default.nix
new file mode 100644
index 00000000000..c7ddb44d0fe
--- /dev/null
+++ b/pkgs/tools/networking/boringtun/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "boringtun";
+  # "boringtun" is still undergoing review for security concerns.
+  # The GitHub page does not show any release yet,
+  # use 20190407 as version number to indicate that it is an unstable version.
+  version = "20190407";
+
+  src = fetchFromGitHub {
+    owner = "cloudflare";
+    repo = pname;
+    rev = "b040eb4fd1591b1d5ceb07c6cbb0856553f50adc";
+    sha256 = "04i53dvxld2a0xzr0gfl895rcwfvisj1rfs7rl0444gml8s8xyb3";
+  };
+
+  cargoSha256 = "0mqgd5r3rdzaw3vkmz0rswn3cwq9b4im6g4rrq7wr7pgrzq96xwm";
+
+  # To prevent configuration phase error that is caused by
+  # lacking a new line in file ".cargo/config",
+  # we append a new line to the end of file.
+  preConfigure = "echo '' >> .cargo/config";
+
+  # Testing this project requires sudo, Docker and network access, etc.
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Userspace WireGuard® implementation in Rust";
+    homepage = https://github.com/cloudflare/boringtun;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ xrelkd ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}