usbutils: fix usb.ids path

The utility switched from /usr/share to ${datadir}, but it is still not enough
for use. It would be nice if upstream provided configure flag.
This commit is contained in:
Jan Tojnar
2018-12-01 15:37:19 +01:00
parent d9b650f4cc
commit 8560887e88
2 changed files with 25 additions and 8 deletions
+9 -8
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, libusb1, hwdata }:
{ stdenv, fetchurl, substituteAll, autoreconfHook, pkgconfig, libusb1, hwdata }:
stdenv.mkDerivation rec {
name = "usbutils-010";
@@ -8,14 +8,15 @@ stdenv.mkDerivation rec {
sha256 = "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb1 ];
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit hwdata;
})
];
postInstall =
''
substituteInPlace $out/bin/lsusb.py \
--replace /usr/share/usb.ids ${hwdata}/share/hwdata/usb.ids
'';
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libusb1 ];
meta = with stdenv.lib; {
homepage = http://www.linux-usb.org/;