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:
parent
d9b650f4cc
commit
8560887e88
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, libusb1, hwdata }:
|
{ stdenv, fetchurl, substituteAll, autoreconfHook, pkgconfig, libusb1, hwdata }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "usbutils-010";
|
name = "usbutils-010";
|
||||||
@ -8,14 +8,15 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1";
|
sha256 = "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
patches = [
|
||||||
buildInputs = [ libusb1 ];
|
(substituteAll {
|
||||||
|
src = ./fix-paths.patch;
|
||||||
|
inherit hwdata;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postInstall =
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||||
''
|
buildInputs = [ libusb1 ];
|
||||||
substituteInPlace $out/bin/lsusb.py \
|
|
||||||
--replace /usr/share/usb.ids ${hwdata}/share/hwdata/usb.ids
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.linux-usb.org/;
|
homepage = http://www.linux-usb.org/;
|
||||||
|
16
pkgs/os-specific/linux/usbutils/fix-paths.patch
Normal file
16
pkgs/os-specific/linux/usbutils/fix-paths.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -51,11 +51,11 @@
|
||||||
|
usbreset.c
|
||||||
|
|
||||||
|
lsusb.py: $(srcdir)/lsusb.py.in
|
||||||
|
- sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
|
||||||
|
+ sed 's|VERSION|$(VERSION)|g;s|@usbids@|@hwdata@/share/hwdata/usb.ids|g' $< >$@
|
||||||
|
chmod 755 $@
|
||||||
|
|
||||||
|
lsusb.8: $(srcdir)/lsusb.8.in
|
||||||
|
- sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
|
||||||
|
+ sed 's|VERSION|$(VERSION)|g;s|@usbids@|@hwdata@/share/hwdata/usb.ids|g' $< >$@
|
||||||
|
|
||||||
|
usb-devices.1: $(srcdir)/usb-devices.1.in
|
||||||
|
sed 's|VERSION|$(VERSION)|g' $< >$@
|
Loading…
x
Reference in New Issue
Block a user