GNU Radio: Difference between revisions

From NixOS Wiki
imported>Chuangzhu
add extraPythonPackages
imported>Chuangzhu
add gnuradio.pythonEnv
Line 15: Line 15:
   ];
   ];
}
}
</syntaxhighlight>
To directly run generated Python programs, you can use {{ic|gnuradio.pythonEnv}}. For example:
<syntaxhighlight lang="bash">
$ nix-shell -p '(gnuradio.override { extraPackages = [ gnuradioPackages.osmosdr ]; }).pythonEnv' qt5.qtwayland
[nix-shell:~]$ ./default.py
</syntaxhighlight>
</syntaxhighlight>

Revision as of 03:29, 26 January 2024

GNU Radio is a free and opensource Software Defined Radio platform. NixOS supports currently maintained versions 3.10, 3.9, 3.8.

{
  environment.systemPackages = with pkgs; [
    (gnuradio3_8.override {
      extraPackages = with gnuradio3_8Packages; [
        osmosdr
        limesdr
      ];
      extraPythonPackages = with gnuradio3_8.python.pkgs; [
        numpy
      ];
    })
  ];
}

To directly run generated Python programs, you can use gnuradio.pythonEnv. For example:

$ nix-shell -p '(gnuradio.override { extraPackages = [ gnuradioPackages.osmosdr ]; }).pythonEnv' qt5.qtwayland
[nix-shell:~]$ ./default.py