Files
nixpkgs/pkgs/by-name/us/usbtop/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
libpcap,
boost,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "usbtop";
version = "1.0";
src = fetchFromGitHub {
owner = "aguinet";
repo = "usbtop";
tag = "release-${finalAttrs.version}";
hash = "sha256-Ws90l5C+KzQC5QgbX7+Hv/Fw5lRAGQoSzJJIgxVoamE=";
};
postPatch =
# fix compatibility with CMake (https://cmake.org/cmake/help/v4.0/command/cmake_minimum_required.html)
# TODO: drop when https://github.com/aguinet/usbtop/pull/45 is merged
''
substituteInPlace CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 2.8)' \
'cmake_minimum_required(VERSION 2.8...4.0)'
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
libpcap
boost
];
meta = {
homepage = "https://github.com/aguinet/usbtop";
changelog = "https://github.com/aguinet/usbtop/raw/${finalAttrs.src.rev}/CHANGELOG";
description = "Top utility that shows an estimated instantaneous bandwidth on USB buses and devices";
mainProgram = "usbtop";
maintainers = [ ];
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
})