2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
2018-04-25 17:01:40 +00:00
|
|
|
, hackrf, soapysdr
|
2022-10-06 17:14:13 +00:00
|
|
|
, libobjc, IOKit, Security
|
2018-04-25 17:01:40 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2022-01-27 00:51:15 +00:00
|
|
|
version = "0.3.4";
|
2018-04-25 17:01:40 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "soapyhackrf";
|
|
|
|
inherit version;
|
2018-04-25 17:01:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pothosware";
|
|
|
|
repo = "SoapyHackRF";
|
|
|
|
rev = "soapy-hackrf-${version}";
|
2022-01-27 00:51:15 +00:00
|
|
|
sha256 = "sha256-fzPYHJAPX8FkFxPXpLlUagTd/NoamRX0YnxHwkbV1nI=";
|
2018-04-25 17:01:40 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-10-06 17:14:13 +00:00
|
|
|
buildInputs = [ hackrf soapysdr ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
|
2018-04-25 17:01:40 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/pothosware/SoapyHackRF";
|
2018-04-25 17:01:40 +00:00
|
|
|
description = "SoapySDR plugin for HackRF devices";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2022-10-06 17:14:13 +00:00
|
|
|
platforms = platforms.unix;
|
2018-04-25 17:01:40 +00:00
|
|
|
};
|
|
|
|
}
|