add norouter

This commit is contained in:
Rongsong Shen 2026-03-27 21:04:40 +08:00
parent 0286e0d645
commit d14037ffd6
3 changed files with 28 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*~

View file

@ -4,6 +4,7 @@ let
cedro = callPackage ./pkgs/c/cedro/package.nix {}; cedro = callPackage ./pkgs/c/cedro/package.nix {};
capnpc = callPackage ./pkgs/c/capnpc/package.nix {}; capnpc = callPackage ./pkgs/c/capnpc/package.nix {};
gost-ctl = callPackage ./pkgs/g/gost-ctl/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 { xbuild = callPackage ./pkgs/x/xbuild/package.nix {
pkgs = pkgs; pkgs = pkgs;
cedro = cedro; cedro = cedro;
@ -82,6 +83,7 @@ in
capnpc = capnpc; capnpc = capnpc;
cedro = cedro; cedro = cedro;
gost-ctl = gost-ctl; gost-ctl = gost-ctl;
norouter = norouter;
zlog_with_pkgconf = zlog_with_pkgconf; zlog_with_pkgconf = zlog_with_pkgconf;
tinylog = tinylog; tinylog = tinylog;
unity_test_with_color = unity_test_with_color; unity_test_with_color = unity_test_with_color;

View file

@ -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
'';
}