From 77c58c9de14bac5b22ce20e7a704059c12d89c46 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 3 Oct 2017 18:04:30 -0500 Subject: [PATCH] libusb: fix header usage on musl, patch from Alpine --- pkgs/development/libraries/libusb/default.nix | 2 ++ pkgs/development/libraries/libusb/fix-headers.patch | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 pkgs/development/libraries/libusb/fix-headers.patch diff --git a/pkgs/development/libraries/libusb/default.nix b/pkgs/development/libraries/libusb/default.nix index 1fd3cb39bbf..4704a1e5c33 100644 --- a/pkgs/development/libraries/libusb/default.nix +++ b/pkgs/development/libraries/libusb/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation { sha256 = "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"; }; + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch; + meta = { platforms = stdenv.lib.platforms.unix; }; diff --git a/pkgs/development/libraries/libusb/fix-headers.patch b/pkgs/development/libraries/libusb/fix-headers.patch new file mode 100644 index 00000000000..ea9cbc34978 --- /dev/null +++ b/pkgs/development/libraries/libusb/fix-headers.patch @@ -0,0 +1,10 @@ +--- libusb-compat-0.1.5.orig/libusb/usb.h ++++ libusb-compat-0.1.5/libusb/usb.h +@@ -25,6 +25,7 @@ + #ifndef __USB_H__ + #define __USB_H__ + ++#include + #include + #include + #include