about summary refs log tree commit diff
path: root/pkgs/development/gnuradio-modules/limesdr/default.nix
blob: bdd541f04432f99c249c9f6209e706e6f8afb6f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib
, mkDerivation
, fetchFromGitHub
, gnuradio
, thrift
, cmake
, pkg-config
, doxygen
, swig
, python
, logLib
, mpir
, boost
, gmp
, icu
, limesuite
, gnuradioAtLeast
}:

let
  version = {
    "3.7" = "2.0.0";
    "3.8" = "3.0.1";
  }.${gnuradio.versionAttr.major};
  src = fetchFromGitHub {
    owner = "myriadrf";
    repo = "gr-limesdr";
    rev = "v${version}";
    sha256 = {
      "3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
      "3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
    }.${gnuradio.versionAttr.major};
  };
in mkDerivation {
  pname = "gr-limesdr";
  inherit version src;
  disabled = gnuradioAtLeast "3.9";

  nativeBuildInputs = [
    cmake
    pkg-config
    swig
    python
  ];
  buildInputs = [
    logLib
    mpir
    boost
    gmp
    icu
    limesuite
  ] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
    thrift
    python.pkgs.thrift
  ];

  meta = with lib; {
    description = "Gnuradio source and sink blocks for LimeSDR";
    homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = [ maintainers.markuskowa ];
  };
}