airspy: fix build

It was using libusb-compat instead of libusb1, and the former no longer propagates the latter.
This commit is contained in:
Jan Tojnar 2020-04-02 07:59:05 +02:00
parent 1e371763f9
commit f613cea0f7
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,36 +1,33 @@
{ stdenv, lib, fetchFromGitHub { stdenv, lib, fetchFromGitHub
, cmake , pkgconfig, libusb , cmake , pkgconfig, libusb1
}: }:
let stdenv.mkDerivation rec {
pname = "airspy";
version = "1.0.9"; version = "1.0.9";
in
stdenv.mkDerivation {
pname = "airspy";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "airspy"; owner = "airspy";
repo = "airspyone_host"; repo = "airspyone_host";
rev = "v${version}"; rev = "v${version}";
sha256 = "04kx2p461sqd4q354n1a99zcabg9h29dwcnyhakykq8bpg3mgf1x"; sha256 = "04kx2p461sqd4q354n1a99zcabg9h29dwcnyhakykq8bpg3mgf1x";
}; };
postPatch = '' postPatch = ''
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d" substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
''; '';
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libusb ]; buildInputs = [ libusb1 ];
cmakeFlags = cmakeFlags =
lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ]; lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/airspy/airspyone_host; homepage = https://github.com/airspy/airspyone_host;
description = "Host tools and driver library for the AirSpy SDR"; description = "Host tools and driver library for the AirSpy SDR";
license = licenses.bsd3; license = licenses.bsd3;
platforms = with platforms; linux ++ darwin; platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ markuskowa ]; maintainers = with maintainers; [ markuskowa ];
}; };
} }