2019-12-26 18:28:06 +00:00
|
|
|
{ lib, stdenv, kernel, udev, autoconf, automake, libtool }:
|
2017-11-22 22:54:50 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2017-11-22 22:54:50 +00:00
|
|
|
name = "usbip-${kernel.name}";
|
|
|
|
|
|
|
|
src = kernel.src;
|
|
|
|
|
2019-12-26 18:28:06 +00:00
|
|
|
patches = lib.optionals (lib.versionAtLeast "5.4" kernel.version) [
|
2019-06-17 10:23:19 +01:00
|
|
|
# fixes build with gcc8
|
|
|
|
./fix-snprintf-truncation.patch
|
2019-11-03 00:22:41 +00:00
|
|
|
# fixes build with gcc9
|
|
|
|
./fix-strncpy-truncation.patch
|
2019-06-17 10:23:19 +01:00
|
|
|
];
|
|
|
|
|
2017-11-22 22:54:50 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool ];
|
|
|
|
buildInputs = [ udev ];
|
|
|
|
|
2019-11-03 00:22:41 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
|
|
|
|
|
2017-11-22 22:54:50 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd tools/usb/usbip
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/torvalds/linux/tree/master/tools/usb/usbip";
|
2017-11-22 22:54:50 +00:00
|
|
|
description = "allows to pass USB device from server to client over the network";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|