Files
nixpkgs/pkgs/os-specific/linux/usbip/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.0 KiB
Nix

{
lib,
stdenv,
kernel,
udev,
autoconf,
automake,
libtool,
hwdata,
kernelOlder,
}:
stdenv.mkDerivation {
name = "usbip-${kernel.name}";
src = kernel.src;
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 = {
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 = with lib.licenses; [
gpl2Only
gpl2Plus
];
platforms = lib.platforms.linux;
broken = kernelOlder "4.10";
};
}