9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
, patchelf
|
|
, pkg-config
|
|
, 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 pkg-config ];
|
|
|
|
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;
|
|
};
|
|
}
|