diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-04-29 08:35:47 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-04-29 08:35:47 +0200 |
commit | 2874eebfd27731a8ceef3856be35338affd32eaa (patch) | |
tree | 674cb8c6addbdc3f8e2290ebdc34c5b3fa714c1b /pkgs/development/libraries/libusb-compat/0.1.nix | |
parent | 1014c7cb423c5866c06bf671dab5eed667ba245b (diff) | |
parent | f14021febf9c856e07a561124a1d67b90b5bf057 (diff) | |
download | nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar.gz nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar.bz2 nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar.lz nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar.xz nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.tar.zst nixlib-2874eebfd27731a8ceef3856be35338affd32eaa.zip |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/development/libraries/libusb-compat/0.1.nix')
-rw-r--r-- | pkgs/development/libraries/libusb-compat/0.1.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libusb-compat/0.1.nix b/pkgs/development/libraries/libusb-compat/0.1.nix new file mode 100644 index 000000000000..2830ef284587 --- /dev/null +++ b/pkgs/development/libraries/libusb-compat/0.1.nix @@ -0,0 +1,47 @@ +{ stdenv +, lib +, fetchFromGitHub +, autoreconfHook +, patchelf +, pkgconfig +, libusb1 +}: + +stdenv.mkDerivation rec { + pname = "libusb-compat"; + version = "0.1.7"; + + outputs = [ "out" "dev" ]; # get rid of propagating systemd closure + outputBin = "dev"; + + nativeBuildInputs = [ autoreconfHook patchelf pkgconfig ]; + + buildInputs = [ libusb1 ]; + + src = fetchFromGitHub { + owner = "libusb"; + repo = "libusb-compat-0.1"; + rev = "v${version}"; + sha256 = "1nybccgjs14b3phhaycq2jx1gym4nf6sghvnv9qdfmlqxacx0jz5"; + }; + + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch; + + # without this, libusb-compat is unable to find libusb1 + postFixup = '' + find $out/lib -name \*.so\* -type f -exec \ + patchelf --set-rpath ${lib.makeLibraryPath buildInputs} {} \; + ''; + + meta = with stdenv.lib; { + homepage = "https://libusb.info/"; + repositories.git = "https://github.com/libusb/libusb-compat-0.1"; + description = "cross-platform user-mode USB device library"; + longDescription = '' + libusb is a cross-platform user-mode library that provides access to USB devices. + The current API is of 1.0 version (libusb-1.0 API), this library is a wrapper exposing the legacy API. + ''; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; +} |