2018-01-01 01:16:21 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2017-12-06 08:37:05 +00:00
|
|
|
, cmake , pkgconfig, libusb
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "1.0.9";
|
2017-12-14 12:33:41 +00:00
|
|
|
in
|
2017-12-06 08:37:05 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "airspy-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "airspy";
|
|
|
|
repo = "airspyone_host";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "04kx2p461sqd4q354n1a99zcabg9h29dwcnyhakykq8bpg3mgf1x";
|
|
|
|
};
|
|
|
|
|
2017-12-15 08:39:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
|
|
|
'';
|
|
|
|
|
2017-12-06 08:37:05 +00:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [ libusb ];
|
2017-12-14 12:33:41 +00:00
|
|
|
|
2018-01-01 01:16:21 +00:00
|
|
|
cmakeFlags =
|
|
|
|
lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
|
2017-12-14 12:33:41 +00:00
|
|
|
|
2017-12-06 08:37:05 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://github.com/airspy/airspyone_host;
|
2017-12-06 08:37:05 +00:00
|
|
|
description = "Host tools and driver library for the AirSpy SDR";
|
2018-10-12 15:00:56 +01:00
|
|
|
license = licenses.bsd3;
|
2018-01-01 01:16:21 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2017-12-14 12:33:41 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2017-12-06 08:37:05 +00:00
|
|
|
};
|
|
|
|
}
|