GNU Radio: Difference between revisions

From NixOS Wiki
imported>Chuangzhu
add extraPythonPackages
Klinger (talk | contribs)
m added to Category:Applications
 
(One intermediate revision by one other user not shown)
Line 16: Line 16:
}
}
</syntaxhighlight>
</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>
[[Category:Applications]]

Latest revision as of 15:57, 19 April 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