Merge pull request #218771 from SharzyL/nexttrace

nexttrace: init at 1.1.3
This commit is contained in:
Ilan Joselevich 2023-03-08 05:26:56 +02:00 committed by GitHub
commit 9cdf69525b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 0 deletions

View file

@ -205,6 +205,7 @@
./programs/nbd.nix
./programs/neovim.nix
./programs/nethoscope.nix
./programs/nexttrace.nix
./programs/nix-index.nix
./programs/nix-ld.nix
./programs/nm-applet.nix

View file

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
let
cfg = config.programs.nexttrace;
in
{
options = {
programs.nexttrace = {
enable = lib.mkEnableOption (lib.mdDoc "Nexttrace to the global environment and configure a setcap wrapper for it");
package = lib.mkPackageOptionMD pkgs "nexttrace" { };
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
security.wrappers.nexttrace = {
owner = "root";
group = "root";
capabilities = "cap_net_raw,cap_net_admin+eip";
source = "${cfg.package}/bin/nexttrace";
};
};
}

View file

@ -0,0 +1,30 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "nexttrace";
version = "1.1.3";
src = fetchFromGitHub {
owner = "sjlleo";
repo = pname;
rev = "v${version}";
sha256 = "sha256-sOTQBh6j8od24s36J0e2aKW1mWmAD/ThfY6pd1SsSlY=";
};
vendorHash = "sha256-ckGoDV4GNp0mG+bkCKoLBO+ap53R5zrq/ZSKiFmVf9U=";
doCheck = false; # Tests require a network connection.
ldflags = [
"-s"
"-w"
"-X github.com/xgadget-lab/nexttrace/printer.version=v${version}"
];
meta = with lib; {
description = "An open source visual route tracking CLI tool";
homepage = "https://mtr.moe";
license = licenses.gpl3Only;
maintainers = with maintainers; [ sharzy ];
};
}

View file

@ -5317,6 +5317,8 @@ with pkgs;
nextdns = callPackage ../applications/networking/nextdns { };
nexttrace = callPackage ../tools/networking/nexttrace { };
ngadmin = callPackage ../applications/networking/ngadmin { };
nfdump = callPackage ../tools/networking/nfdump { };