2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, cmake , pkg-config, libusb1
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "airspy";
|
2021-04-25 03:57:28 +00:00
|
|
|
version = "1.0.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "airspy";
|
|
|
|
repo = "airspyone_host";
|
|
|
|
rev = "v${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
sha256 = "1v7sfkkxc6f8ny1p9xrax1agkl6q583mjx8k0lrrwdz31rf9qgw9";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libusb1 ];
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|