1{ stdenv, fetchgit, cmake, pkgconfig, libusb, fftwSinglePrec }:
2
3stdenv.mkDerivation rec {
4 name = "hackrf-${version}";
5 version = "2017.02.1";
6
7 src = fetchgit {
8 url = "git://github.com/mossmann/hackrf";
9 rev = "refs/tags/v${version}";
10 sha256 = "16hd61icvzaciv7s9jpgm9c8q6m4mwvj97gxrb20sc65p5gjb7hv";
11 };
12
13 nativeBuildInputs = [ pkgconfig ];
14 buildInputs = [
15 cmake libusb fftwSinglePrec
16 ];
17
18 cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ];
19
20 preConfigure = ''
21 cd host
22 '';
23
24 meta = with stdenv.lib; {
25 description = "An open source SDR platform";
26 homepage = http://greatscottgadgets.com/hackrf/;
27 license = licenses.gpl2;
28 platforms = platforms.all;
29 maintainers = with maintainers; [ sjmackenzie the-kenny ];
30 };
31}