2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, rtl-sdr
|
|
|
|
, soapysdr
|
|
|
|
, libobjc
|
|
|
|
, IOKit
|
|
|
|
, Security
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "soapyrtlsdr";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pothosware";
|
|
|
|
repo = "SoapyRTLSDR";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "soapy-rtl-sdr-${finalAttrs.version}";
|
|
|
|
sha256 = "sha256-IapdrBE8HhibY52Anm76/mVAoA0GghwnRCxxfGkyLTw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [ rtl-sdr soapysdr ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pothosware/SoapyRTLSDR";
|
|
|
|
description = "SoapySDR plugin for RTL-SDR devices";
|
|
|
|
license = licenses.mit;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ ragge luizribeiro ];
|
2021-10-28 06:52:43 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
})
|