Merge pull request #333462 from Luflosi/nixos-iperf3-package-option

This commit is contained in:
Franz Pletz 2024-08-16 14:46:53 +02:00 committed by GitHub
commit 4bd91be1ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ let
api = {
enable = mkEnableOption "iperf3 network throughput testing server";
package = mkPackageOption pkgs "iperf3" { };
port = mkOption {
type = types.ints.u16;
default = 5201;
@ -76,7 +77,7 @@ let
CapabilityBoundingSet = "";
NoNewPrivileges = true;
ExecStart = ''
${pkgs.iperf3}/bin/iperf \
${lib.getExe cfg.package} \
--server \
--port ${toString cfg.port} \
${optionalString (cfg.affinity != null) "--affinity ${toString cfg.affinity}"} \

View File

@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
description = "Tool to measure IP bandwidth using UDP or TCP";
platforms = lib.platforms.unix;
license = lib.licenses.bsd3;
mainProgram = "iperf3";
maintainers = with lib.maintainers; [ fpletz ];
};
}