nixpkgs/pkgs/applications/radio/airspy/default.nix
Jan Tojnar f613cea0f7
airspy: fix build
It was using libusb-compat instead of libusb1, and the former no longer propagates the latter.
2020-04-02 07:59:05 +02:00

34 lines
882 B
Nix

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