2021-04-25 03:57:28 +00:00
|
|
|
{ lib, stdenv, kernel, udev, autoconf, automake, libtool, hwdata, kernelOlder }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "usbip-${kernel.name}";
|
|
|
|
|
|
|
|
src = kernel.src;
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
patches = lib.optionals (kernelOlder "5.4") [
|
2020-04-24 23:36:52 +00:00
|
|
|
# fixes build with gcc8
|
|
|
|
./fix-snprintf-truncation.patch
|
|
|
|
# fixes build with gcc9
|
|
|
|
./fix-strncpy-truncation.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake libtool ];
|
|
|
|
buildInputs = [ udev ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd tools/usb/usbip
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
configureFlags = [ "--with-usbids-dir=${hwdata}/share/hwdata/" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/torvalds/linux/tree/master/tools/usb/usbip";
|
|
|
|
description = "allows to pass USB device from server to client over the network";
|
2021-04-26 19:14:03 +00:00
|
|
|
license = with licenses; [ gpl2Only gpl2Plus ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2020-11-03 02:18:15 +00:00
|
|
|
broken = kernelOlder "4.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|