maintainers: remove email for amuckstot30 (#360059)
[NixPkgs.git] / pkgs / os-specific / linux / usbip / default.nix
blobadaaab868b78a7b5d871b364e01ebc268d4520ce
1 { lib, stdenv, kernel, udev, autoconf, automake, libtool, hwdata, kernelOlder }:
3 stdenv.mkDerivation {
4   name = "usbip-${kernel.name}";
6   src = kernel.src;
8   patches = lib.optionals (kernelOlder "5.4") [
9     # fixes build with gcc8
10     ./fix-snprintf-truncation.patch
11     # fixes build with gcc9
12     ./fix-strncpy-truncation.patch
13   ] ++ kernel.patches;
15   nativeBuildInputs = [ autoconf automake libtool ];
16   buildInputs = [ udev ];
18   env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address-of-packed-member" ];
20   preConfigure = ''
21     cd tools/usb/usbip
22     ./autogen.sh
23   '';
25   configureFlags = [ "--with-usbids-dir=${hwdata}/share/hwdata/" ];
27   meta = with lib; {
28     homepage = "https://github.com/torvalds/linux/tree/master/tools/usb/usbip";
29     description = "allows to pass USB device from server to client over the network";
30     license = with licenses; [ gpl2Only gpl2Plus ];
31     platforms = platforms.linux;
32     broken = kernelOlder "4.10";
33   };