2018-01-01 02:16:21 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2021-01-17 03:09:27 +01:00
|
|
|
, cmake , pkg-config, libusb1
|
2017-12-06 09:37:05 +01:00
|
|
|
}:
|
|
|
|
|
2020-04-02 07:59:05 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "airspy";
|
2021-04-24 22:56:54 +02:00
|
|
|
version = "1.0.10";
|
2017-12-06 09:37:05 +01:00
|
|
|
|
2020-04-02 07:59:05 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "airspy";
|
|
|
|
repo = "airspyone_host";
|
|
|
|
rev = "v${version}";
|
2021-04-24 22:56:54 +02:00
|
|
|
sha256 = "1v7sfkkxc6f8ny1p9xrax1agkl6q583mjx8k0lrrwdz31rf9qgw9";
|
2020-04-02 07:59:05 +02:00
|
|
|
};
|
2017-12-06 09:37:05 +01:00
|
|
|
|
2020-04-02 07:59:05 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
|
|
|
'';
|
2017-12-15 09:39:15 +01:00
|
|
|
|
2021-01-17 03:09:27 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-02 07:59:05 +02:00
|
|
|
buildInputs = [ libusb1 ];
|
2017-12-14 13:33:41 +01:00
|
|
|
|
2020-04-02 07:59:05 +02:00
|
|
|
cmakeFlags =
|
|
|
|
lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];
|
2017-12-14 13:33:41 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/airspy/airspyone_host";
|
2020-04-02 07:59:05 +02:00
|
|
|
description = "Host tools and driver library for the AirSpy SDR";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
|
|
};
|
|
|
|
}
|