2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, uhd, boost, soapysdr
|
2022-10-21 18:38:19 +00:00
|
|
|
, libobjc, IOKit, Security
|
2020-04-24 23:36:52 +00:00
|
|
|
} :
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "soapyuhd";
|
2020-12-27 14:24:52 +00:00
|
|
|
version = "0.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pothosware";
|
|
|
|
repo = "SoapyUHD";
|
|
|
|
rev = "soapy-uhd-${version}";
|
2020-12-27 14:24:52 +00:00
|
|
|
sha256 = "14rk9ap9ayks2ma6mygca08yfds9bgfmip8cvwl87l06hwhnlwhj";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ uhd boost soapysdr ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s:DESTINATION .*uhd/modules:DESTINATION $out/lib/uhd/modules:" CMakeLists.txt
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pothosware/SoapyAirspy";
|
|
|
|
description = "SoapySDR plugin for UHD devices";
|
2020-12-27 14:24:52 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|