2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, hackrf, soapysdr
|
2022-10-21 18:38:19 +00:00
|
|
|
, libobjc, IOKit, Security
|
2020-04-24 23:36:52 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2022-01-27 00:19:43 +00:00
|
|
|
version = "0.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "soapyhackrf";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pothosware";
|
|
|
|
repo = "SoapyHackRF";
|
|
|
|
rev = "soapy-hackrf-${version}";
|
2022-01-27 00:19:43 +00:00
|
|
|
sha256 = "sha256-fzPYHJAPX8FkFxPXpLlUagTd/NoamRX0YnxHwkbV1nI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ hackrf 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/SoapyHackRF";
|
|
|
|
description = "SoapySDR plugin for HackRF devices";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|