Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, substituteAll, autoreconfHook, pkg-config, libusb1, hwdata, python3 }: 2 3stdenv.mkDerivation rec { 4 pname = "usbutils"; 5 version = "015"; 6 7 src = fetchurl { 8 url = "mirror://kernel/linux/utils/usb/usbutils/usbutils-${version}.tar.xz"; 9 sha256 = "sha256-w7RRux9P+fY1bKxaaVaprI6F2BZRr1ainmiflPpv2m4="; 10 }; 11 12 patches = [ 13 (substituteAll { 14 src = ./fix-paths.patch; 15 inherit hwdata; 16 }) 17 ]; 18 19 nativeBuildInputs = [ autoreconfHook pkg-config ]; 20 buildInputs = [ libusb1 python3 ]; 21 22 outputs = [ "out" "man" "python" ]; 23 postInstall = '' 24 moveToOutput "bin/lsusb.py" "$python" 25 ''; 26 27 meta = with lib; { 28 homepage = "http://www.linux-usb.org/"; 29 description = "Tools for working with USB devices, such as lsusb"; 30 maintainers = with maintainers; [ ]; 31 license = licenses.gpl2Plus; 32 platforms = platforms.linux; 33 }; 34}