summary refs log tree commit diff
path: root/pkgs/os-specific/linux/usbutils/default.nix
blob: 710a01ed03d26a937104f99b58d012ad296fa25f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ stdenv, fetchurl, pkgconfig, libusb1, hwdata }:

stdenv.mkDerivation rec {
  name = "usbutils-008";

  src = fetchurl {
    url = "mirror://kernel/linux/utils/usb/usbutils/${name}.tar.xz";
    sha256 = "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24";
  };

  buildInputs = [ pkgconfig libusb1 ];

  postInstall =
    ''
      rm $out/sbin/update-usbids.sh
      substituteInPlace $out/bin/lsusb.py \
        --replace /usr/share/usb.ids ${hwdata}/data/hwdata/usb.ids
    '';

  meta = {
    homepage = http://www.linux-usb.org/;
    description = "Tools for working with USB devices, such as lsusb";
    platforms = stdenv.lib.platforms.linux;
  };
}