2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, fftwSinglePrec }:
|
2015-05-08 16:31:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "hackrf";
|
2018-12-08 15:17:25 +00:00
|
|
|
version = "2018.01.1";
|
2015-05-08 16:31:26 +01:00
|
|
|
|
2018-12-08 15:17:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mossmann";
|
|
|
|
repo = "hackrf";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0idh983xh6gndk9kdgx5nzz76x3mxb42b02c5xvdqahadsfx3b9w";
|
2015-05-08 16:31:26 +01:00
|
|
|
};
|
|
|
|
|
2020-04-02 07:14:13 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-17 02:09:27 +00:00
|
|
|
pkg-config
|
2020-04-02 07:14:13 +01:00
|
|
|
];
|
|
|
|
|
2015-05-08 16:31:26 +01:00
|
|
|
buildInputs = [
|
2020-04-02 07:14:13 +01:00
|
|
|
libusb1
|
|
|
|
fftwSinglePrec
|
2015-05-08 16:31:26 +01:00
|
|
|
];
|
2017-07-26 18:01:42 +01:00
|
|
|
|
2017-07-26 18:11:58 +01:00
|
|
|
cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ];
|
|
|
|
|
2015-05-08 16:31:26 +01:00
|
|
|
preConfigure = ''
|
2017-07-26 18:01:42 +01:00
|
|
|
cd host
|
2015-05-08 16:31:26 +01:00
|
|
|
'';
|
2017-07-26 18:01:42 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-05-08 16:31:26 +01:00
|
|
|
description = "An open source SDR platform";
|
2020-10-02 08:58:50 +01:00
|
|
|
homepage = "https://greatscottgadgets.com/hackrf/";
|
2015-05-08 16:31:26 +01:00
|
|
|
license = licenses.gpl2;
|
2015-10-31 22:47:24 +00:00
|
|
|
platforms = platforms.all;
|
2020-05-09 10:25:07 +01:00
|
|
|
maintainers = with maintainers; [ sjmackenzie ];
|
2015-05-08 16:31:26 +01:00
|
|
|
};
|
|
|
|
}
|