noptica2-sdr/shell.nix

30 lines
1.0 KiB
Nix
Raw Normal View History

2020-01-05 18:38:43 +08:00
let
pkgs = import <nixpkgs> { };
pyqtgraph-qt5 = pkgs.python3Packages.buildPythonPackage rec {
name = "pyqtgraph_qt5-${version}";
version = "0.10.0";
doCheck = false;
src = pkgs.fetchFromGitHub {
owner = "pyqtgraph";
repo = "pyqtgraph";
rev = "1426e334e1d20542400d77c72c132b04c6d17ddb";
sha256 = "1079haxyr316jf0wpirxdj0ry6j8mr16cqr0dyyrd5cnxwl7zssh";
};
propagatedBuildInputs = with pkgs.python3Packages; [ scipy numpy pyqt5 pyopengl ];
};
2020-01-27 18:26:54 +08:00
bitstream = pkgs.fetchurl {
url = "https://www.nuand.com/fpga/v0.11.0/hostedxA4.rbf";
sha256 = "c172e35c4a92cf1e0ca3b37347a84d8376b275ece16cb9c5142b72b82b16fe8e";
};
2020-01-05 18:38:43 +08:00
in
pkgs.mkShell {
buildInputs = [
(pkgs.python3.withPackages(ps: [ps.soapysdr-with-plugins ps.scipy ps.pyserial ps.quamash ps.pyqt5 pyqtgraph-qt5]))
2020-01-25 15:27:04 +08:00
pkgs.libbladeRF pkgs.gqrx
2020-01-05 18:38:43 +08:00
];
2020-01-27 18:26:54 +08:00
shellHook = ''
${pkgs.libbladeRF}/bin/bladeRF-cli -l ${bitstream}
${pkgs.libbladeRF}/bin/bladeRF-cli -e "set biastee rx on"
'';
2020-01-05 18:38:43 +08:00
}