From d14037ffd66887ce83a68a565c6010901817118c Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Fri, 27 Mar 2026 21:04:40 +0800 Subject: [PATCH] add norouter --- .gitignore | 1 + default.nix | 2 ++ pkgs/n/norouter/package.nix | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 .gitignore create mode 100644 pkgs/n/norouter/package.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/default.nix b/default.nix index 31019c3..8223628 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,7 @@ let cedro = callPackage ./pkgs/c/cedro/package.nix {}; capnpc = callPackage ./pkgs/c/capnpc/package.nix {}; gost-ctl = callPackage ./pkgs/g/gost-ctl/package.nix {}; + norouter = callPackage ./pkgs/n/norouter/package.nix {}; xbuild = callPackage ./pkgs/x/xbuild/package.nix { pkgs = pkgs; cedro = cedro; @@ -82,6 +83,7 @@ in capnpc = capnpc; cedro = cedro; gost-ctl = gost-ctl; + norouter = norouter; zlog_with_pkgconf = zlog_with_pkgconf; tinylog = tinylog; unity_test_with_color = unity_test_with_color; diff --git a/pkgs/n/norouter/package.nix b/pkgs/n/norouter/package.nix new file mode 100644 index 0000000..e2cf540 --- /dev/null +++ b/pkgs/n/norouter/package.nix @@ -0,0 +1,25 @@ +{ stdenvNoCC, lib, fetchurl, autoPatchelfHook, zlib, openssl }: + +stdenvNoCC.mkDerivation rec { + pname = "norouter"; + version = "0.6.5"; + + src = fetchurl { + url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-Linux-x86_64.tgz"; + hash = "sha256-kNAzGBuYLLHITGJAerH27kj8MjmxjII63ORym//rJEk="; + }; + + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ zlib openssl ]; # Add required libraries + + dontUnpack = true; + + configurePhase = '' + cat $src |gzip -dc |tar xf - + ''; + + installPhase = '' + mkdir -p $out/bin + cp norouter $out/bin + ''; +}