From 329d46cbd62da804fee673d0d9be4da2f553d4d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?=
 <viric@vicerveza.homeunix.net>
Date: Sat, 6 Mar 2010 22:34:21 +0000
Subject: [PATCH] Making libusb build on non-linux. It was built with -Werror,
 and I removed that. There were compiler warnings in non-linux.

svn path=/nixpkgs/trunk/; revision=20456
---
 pkgs/development/libraries/libusb/default.nix | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pkgs/development/libraries/libusb/default.nix b/pkgs/development/libraries/libusb/default.nix
index 3db75ccfda43..64ef4ed66b6d 100644
--- a/pkgs/development/libraries/libusb/default.nix
+++ b/pkgs/development/libraries/libusb/default.nix
@@ -2,6 +2,13 @@
 
 stdenv.mkDerivation {
   name = "libusb-0.1.12";
+
+  # On non-linux, we get warnings compiling, and we don't want the
+  # build to break.
+  patchPhase = ''
+    sed -i s/-Werror// Makefile.in
+  '';
+
   src = fetchurl {
     url = mirror://sourceforge/libusb/libusb-0.1.12.tar.gz;
     md5 = "caf182cbc7565dac0fd72155919672e6";