From 898ce2046d8066e21713ca2265f56e1ccdd74275 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Sun, 8 Dec 2024 20:18:37 +0800 Subject: [PATCH] pkgs/ranet: init at 0.11.0 --- pkgs/netns-proxy/package.nix | 17 ++++++++++++++--- pkgs/ranet/package.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 pkgs/ranet/package.nix diff --git a/pkgs/netns-proxy/package.nix b/pkgs/netns-proxy/package.nix index 2a4eed4..5735998 100644 --- a/pkgs/netns-proxy/package.nix +++ b/pkgs/netns-proxy/package.nix @@ -1,17 +1,28 @@ -{ rustPlatform, fetchFromGitHub, ... }: +{ + lib, + rustPlatform, + fetchFromGitHub, + ... +}: rustPlatform.buildRustPackage rec { - name = "netns-proxy"; + pname = "netns-proxy"; + version = "unstable-2023-09-17"; src = fetchFromGitHub { owner = "fooker"; repo = "netns-proxy"; rev = "6d9ccbfde4375cd614735ea5f6ee5aba2b6cfd2b"; - fetchSubmodules = false; sha256 = "sha256-N+my6cTuA7yNoYxocpRiLNcy7OwrJLvO2cGLJGv8a/I="; }; cargoLock = { lockFile = src + /Cargo.lock; }; + + meta = with lib; { + description = "A simple and slim proxy to forward ports from and into linux network namespaces"; + homepage = "https://github.com/fooker/netns-proxy"; + license = licenses.mit; + }; } diff --git a/pkgs/ranet/package.nix b/pkgs/ranet/package.nix new file mode 100644 index 0000000..c6f6b05 --- /dev/null +++ b/pkgs/ranet/package.nix @@ -0,0 +1,32 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + ... +}: + +rustPlatform.buildRustPackage rec { + pname = "ranet"; + version = "0.11.0"; + + src = fetchFromGitHub { + owner = "NickCao"; + repo = "ranet"; + rev = "v${version}"; + sha256 = "sha256-GB8FXnHzaM06MivfpYEFFIp4q0WfH3a7+jmoC3Tpwbs="; + }; + + cargoLock = { + lockFile = src + /Cargo.lock; + }; + + checkFlags = [ + "--skip=address::test::remote" + ]; + + meta = with lib; { + description = "Redundant array of networks"; + homepage = "https://github.com/NickCao/ranet"; + license = licenses.mit; + }; +}