summary refs log tree commit diff
path: root/pkgs/os-specific/linux/usbip/default.nix
blob: 9f8b02c7537d346a94c309a2dee40f38bd842264 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ stdenv, kernel, udev, autoconf, automake, libtool }:

stdenv.mkDerivation rec {
  name = "usbip-${kernel.name}";

  src = kernel.src;

  patches = [
    # fixes build with gcc8
    ./fix-snprintf-truncation.patch
  ];

  nativeBuildInputs = [ autoconf automake libtool ];
  buildInputs = [ udev ];

  preConfigure = ''
    cd tools/usb/usbip
    ./autogen.sh
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/torvalds/linux/tree/master/tools/usb/usbip;
    description = "allows to pass USB device from server to client over the network";
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}