libusb-compat: fix up the .so so it can find libusb1
This commit is contained in:
parent
8c514e9e7b
commit
59281f742a
@ -1,14 +1,22 @@
|
|||||||
{stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1}:
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, autoreconfHook
|
||||||
|
, patchelf
|
||||||
|
, pkgconfig
|
||||||
|
, libusb1
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libusb-compat-${version}";
|
pname = "libusb-compat";
|
||||||
version = "0.1.7";
|
version = "0.1.7";
|
||||||
|
|
||||||
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook patchelf pkgconfig ];
|
||||||
propagatedBuildInputs = [ libusb1 ];
|
|
||||||
|
buildInputs = [ libusb1 ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libusb";
|
owner = "libusb";
|
||||||
@ -19,6 +27,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch;
|
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; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://libusb.info/";
|
homepage = "https://libusb.info/";
|
||||||
repositories.git = "https://github.com/libusb/libusb-compat-0.1";
|
repositories.git = "https://github.com/libusb/libusb-compat-0.1";
|
||||||
|
Loading…
Reference in New Issue
Block a user