1{stdenv, fetchurl, pkgconfig, libusb1}:
2
3stdenv.mkDerivation {
4 name = "libusb-compat-0.1.5";
5
6 outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
7 outputBin = "dev";
8
9 nativeBuildInputs = [ pkgconfig ];
10 propagatedBuildInputs = [ libusb1 ];
11
12 src = fetchurl {
13 url = mirror://sourceforge/libusb/libusb-compat-0.1.5.tar.bz2;
14 sha256 = "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0";
15 };
16
17 patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch;
18
19 meta = {
20 platforms = stdenv.lib.platforms.unix;
21 };
22}