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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, pkg-config
, enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
, udev
, libobjc
, IOKit
2022-02-22 17:56:27 +00:00
, Security
, withStatic ? false
}:
stdenv.mkDerivation rec {
2019-08-28 23:01:16 +00:00
pname = "libusb";
version = "1.0.25";
src = fetchFromGitHub {
owner = "libusb";
repo = "libusb";
rev = "v${version}";
sha256 = "141wygijjcgka0h31504cdlvih4l2j02j67pcbb2l527p7dbc5pn";
};
2020-05-07 21:25:10 +00:00
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
2015-06-19 19:56:12 +00:00
propagatedBuildInputs =
lib.optional enableUdev udev ++
2022-02-22 17:56:27 +00:00
lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
2013-02-12 22:26:26 +00:00
dontDisableStatic = withStatic;
configureFlags = lib.optional (!enableUdev) "--disable-udev";
preFixup = lib.optionalString enableUdev ''
sed 's,-ludev,-L${lib.getLib udev}/lib -ludev,' -i $out/lib/libusb-1.0.la
2015-06-25 13:07:05 +00:00
'';
meta = with lib; {
2018-10-11 12:30:10 +00:00
homepage = "https://libusb.info/";
description = "cross-platform user-mode USB device library";
longDescription = ''
libusb is a cross-platform user-mode library that provides access to USB devices.
'';
platforms = platforms.all;
license = licenses.lgpl21Plus;
2020-12-14 12:03:36 +00:00
maintainers = with maintainers; [ prusnak ];
};
}