mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 05:00:19 +00:00
Merge pull request #218771 from SharzyL/nexttrace
nexttrace: init at 1.1.3
This commit is contained in:
commit
9cdf69525b
@ -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
|
||||
|
25
nixos/modules/programs/nexttrace.nix
Normal file
25
nixos/modules/programs/nexttrace.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
30
pkgs/tools/networking/nexttrace/default.nix
Normal file
30
pkgs/tools/networking/nexttrace/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user