nixpkgs/pkgs/development/libraries/usbredir/default.nix

31 lines
983 B
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, libusb }:
stdenv.mkDerivation rec {
name = "usbredir-${version}";
2016-09-24 11:49:21 +00:00
version = "0.7.1";
src = fetchurl {
url = "http://spice-space.org/download/usbredir/${name}.tar.bz2";
2016-09-24 11:49:21 +00:00
sha256 = "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0";
};
usbredir: Fix 32-bit build Avoid these warnings from being errors: usbredirhost.c: In function 'usbredirhost_can_write_iso_package': usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold", ^ usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold", ^ usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold", ^ usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold", ^ usbredirhost.c: In function 'usbredirhost_set_iso_threshold': usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes", ^ usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes", I think in all of these cases, the incorrect format modifier just causes wrong debug prints on i686.
2016-09-30 09:18:33 +00:00
# Works around bunch of "format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}'" warnings
NIX_CFLAGS_COMPILE = stdenv.lib.optional (!stdenv.is64bit) "-Wno-error=format"
++ [ "-Wno-error=format-truncation" ]; # newly detected with gcc-7
usbredir: Fix 32-bit build Avoid these warnings from being errors: usbredirhost.c: In function 'usbredirhost_can_write_iso_package': usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold", ^ usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold", ^ usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold", ^ usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold", ^ usbredirhost.c: In function 'usbredirhost_set_iso_threshold': usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes", ^ usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes", I think in all of these cases, the incorrect format modifier just causes wrong debug prints on i686.
2016-09-30 09:18:33 +00:00
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb ];
propagatedBuildInputs = [ libusb ];
2017-03-22 16:05:00 +00:00
outputs = [ "out" "dev" ];
meta = with stdenv.lib; {
description = "USB traffic redirection protocol";
homepage = http://spice-space.org/page/UsbRedir;
license = licenses.lgpl21;
maintainers = [ maintainers.offline ];
platforms = platforms.linux;
};
}