Merge pull request #67758 from etu/init-usbtop

usbtop: init at 1.0
This commit is contained in:
Aaron Andersen 2019-08-31 09:48:23 -04:00 committed by GitHub
commit 5858a3693e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 0 deletions

View file

@ -152,6 +152,7 @@
./programs/tmux.nix
./programs/tsm-client.nix
./programs/udevil.nix
./programs/usbtop.nix
./programs/venus.nix
./programs/vim.nix
./programs/wavemon.nix

View file

@ -0,0 +1,21 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.usbtop;
in {
options = {
programs.usbtop.enable = mkEnableOption "usbtop and required kernel module";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
usbtop
];
boot.kernelModules = [
"usbmon"
];
};
}

View file

@ -0,0 +1,26 @@
{ stdenv, fetchFromGitHub
, cmake
, libpcap, boost }:
stdenv.mkDerivation rec {
pname = "usbtop";
version = "1.0";
src = fetchFromGitHub {
owner = "aguinet";
repo = pname;
rev = "release-${version}";
sha256 = "0qbad0aq6j4jrh90l6a0akk71wdzhyzmy6q8wl138axyj2bp9kss";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libpcap boost ];
meta = with stdenv.lib; {
homepage = "https://github.com/aguinet/usbtop";
description = "A top utility that shows an estimated instantaneous bandwidth on USB buses and devices";
maintainers = with maintainers; [ etu ];
license = licenses.bsd3;
platforms = platforms.linux;
};
}

View file

@ -16502,6 +16502,8 @@ in
withGui = false;
};
usbtop = callPackage ../os-specific/linux/usbtop { };
usbutils = callPackage ../os-specific/linux/usbutils { };
usermount = callPackage ../os-specific/linux/usermount { };