1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/os-specific/linux/usbip/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
966 B
Nix
Raw Normal View History

{ lib, stdenv, kernel, udev, autoconf, automake, libtool, hwdata, kernelOlder }:
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
name = "usbip-${kernel.name}";
src = kernel.src;
2020-10-29 08:15:31 +00:00
patches = lib.optionals (kernelOlder "5.4") [
# fixes build with gcc8
./fix-snprintf-truncation.patch
# fixes build with gcc9
./fix-strncpy-truncation.patch
] ++ kernel.patches;
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = [ udev ];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address-of-packed-member" ];
preConfigure = ''
cd tools/usb/usbip
./autogen.sh
'';
configureFlags = [ "--with-usbids-dir=${hwdata}/share/hwdata/" ];
meta = with 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";
2021-04-25 21:43:21 +01:00
license = with licenses; [ gpl2Only gpl2Plus ];
platforms = platforms.linux;
2020-10-29 08:15:31 +00:00
broken = kernelOlder "4.10";
};
}