mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
nixos/iperf3: add package option
This commit is contained in:
parent
9badce6a75
commit
d80d811a6f
@ -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}"} \
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user