1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

Merge pull request #65671 from ThibautMarty/fix/urh-pluto

urh: add support for Pluto, soundcards, and optionally USRP
This commit is contained in:
markuskowa 2019-08-04 00:35:13 +02:00 committed by GitHub
commit bb0379975d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View file

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, python3Packages { stdenv, lib, fetchFromGitHub, python3Packages
, hackrf, rtl-sdr, airspy, limesuite }: , hackrf, rtl-sdr, airspy, limesuite, libiio
, USRPSupport ? false, uhd }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "urh"; pname = "urh";
@ -12,14 +13,16 @@ python3Packages.buildPythonApplication rec {
sha256 = "1jrrj9c4ddm37m8j0g693xjimpnlvx7lan5kxish5p14xpwdak35"; sha256 = "1jrrj9c4ddm37m8j0g693xjimpnlvx7lan5kxish5p14xpwdak35";
}; };
buildInputs = [ hackrf rtl-sdr airspy limesuite ]; buildInputs = [ hackrf rtl-sdr airspy limesuite libiio ]
++ lib.optional USRPSupport uhd;
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
pyqt5 numpy psutil cython pyzmq pyqt5 numpy psutil cython pyzmq pyaudio
]; ];
doCheck = false; doCheck = false;
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://github.com/jopohl/urh"; homepage = "https://github.com/jopohl/urh";
description = "Universal Radio Hacker: investigate wireless protocols like a boss"; description = "Universal Radio Hacker: investigate wireless protocols like a boss";
license = licenses.gpl3; license = licenses.gpl3;

View file

@ -1,6 +1,7 @@
{ stdenv, fetchFromGitHub { stdenv, fetchFromGitHub
, cmake, flex, bison , cmake, flex, bison
, libxml2, python , libxml2, python
, libusb1, runtimeShell
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -17,7 +18,17 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" "python" ]; outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake flex bison ]; nativeBuildInputs = [ cmake flex bison ];
buildInputs = [ libxml2 ]; buildInputs = [ libxml2 libusb1 ];
postPatch = ''
substituteInPlace libiio.rules.cmakein \
--replace /bin/sh ${runtimeShell}
'';
# since we can't expand $out in cmakeFlags
preConfigure = ''
cmakeFlags="$cmakeFlags -DUDEV_RULES_INSTALL_DIR=$out/etc/udev/rules.d"
'';
postInstall = '' postInstall = ''
mkdir -p $python/lib/${python.libPrefix}/site-packages/ mkdir -p $python/lib/${python.libPrefix}/site-packages/