Merge pull request #82944 from peterhoeg/f/libusb
libusb-compat: fix up the .so so it can find libusb1
This commit is contained in:
commit
438f094334
1 changed files with 18 additions and 4 deletions
|
@ -1,14 +1,22 @@
|
|||
{stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1}:
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, patchelf
|
||||
, pkgconfig
|
||||
, libusb1
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libusb-compat-${version}";
|
||||
pname = "libusb-compat";
|
||||
version = "0.1.7";
|
||||
|
||||
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
||||
outputBin = "dev";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
propagatedBuildInputs = [ libusb1 ];
|
||||
nativeBuildInputs = [ autoreconfHook patchelf pkgconfig ];
|
||||
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libusb";
|
||||
|
@ -19,6 +27,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
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";
|
||||
|
|
Loading…
Reference in a new issue