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