2021-08-18 13:19:15 +00:00
|
|
|
{ lib, stdenv, fetchurl, substituteAll, autoreconfHook, pkg-config, libusb1, hwdata, python3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "usbutils";
|
|
|
|
version = "014";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://kernel/linux/utils/usb/usbutils/usbutils-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-Ogec+tYFYCJ7ZxkkgteBO/ljJvy7ZsBCVIOXFfJ2/Gk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit hwdata;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libusb1 python3 ];
|
|
|
|
|
|
|
|
outputs = [ "out" "man" "python" ];
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "bin/lsusb.py" "$python"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.linux-usb.org/";
|
|
|
|
description = "Tools for working with USB devices, such as lsusb";
|
2021-08-18 13:19:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|