From 184cb1e8c6ac5b226d29f14c5452e9dbafc2792f Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 25 Apr 2018 10:01:40 -0700 Subject: [PATCH 1/6] soapysdr+plugins: init at 0.6.1 --- .../applications/misc/soapyairspy/default.nix | 30 +++++++++++ .../misc/soapybladerf/default.nix | 31 ++++++++++++ .../applications/misc/soapyhackrf/default.nix | 30 +++++++++++ .../applications/misc/soapyremote/default.nix | 28 +++++++++++ pkgs/applications/misc/soapysdr/default.nix | 50 +++++++++++++++++++ pkgs/applications/misc/soapyuhd/default.nix | 34 +++++++++++++ pkgs/top-level/all-packages.nix | 23 +++++++++ 7 files changed, 226 insertions(+) create mode 100644 pkgs/applications/misc/soapyairspy/default.nix create mode 100644 pkgs/applications/misc/soapybladerf/default.nix create mode 100644 pkgs/applications/misc/soapyhackrf/default.nix create mode 100644 pkgs/applications/misc/soapyremote/default.nix create mode 100644 pkgs/applications/misc/soapysdr/default.nix create mode 100644 pkgs/applications/misc/soapyuhd/default.nix diff --git a/pkgs/applications/misc/soapyairspy/default.nix b/pkgs/applications/misc/soapyairspy/default.nix new file mode 100644 index 000000000000..af72c784135d --- /dev/null +++ b/pkgs/applications/misc/soapyairspy/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, cmake +, airspy, soapysdr +} : + +let + version = "0.1.1"; + +in stdenv.mkDerivation { + name = "soapyairspy-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapyAirspy"; + rev = "soapy-airspy-${version}"; + sha256 = "072vc9619s9f22k7639krr1p2418cmhgm44yhzy7x9dzapc43wvk"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ airspy soapysdr ]; + + cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapyAirspy; + description = "SoapySDR plugin for Airspy devices"; + license = licenses.mit; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/soapybladerf/default.nix b/pkgs/applications/misc/soapybladerf/default.nix new file mode 100644 index 000000000000..4e1adc32946e --- /dev/null +++ b/pkgs/applications/misc/soapybladerf/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig +, libbladeRF, soapysdr +} : + +let + version = "0.3.5"; + +in stdenv.mkDerivation { + name = "soapybladerf-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapyBladeRF"; + rev = "soapy-bladerf-${version}"; + sha256 = "1n7vy6y8k1smq3l729npxbhxbnrc79gz06dxkibsihz4k8sddkrg"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ libbladeRF soapysdr ]; + + cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; + + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapyBladeRF; + description = "SoapySDR plugin for BladeRF devices"; + license = licenses.lgpl21; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/soapyhackrf/default.nix b/pkgs/applications/misc/soapyhackrf/default.nix new file mode 100644 index 000000000000..f5543af9c60b --- /dev/null +++ b/pkgs/applications/misc/soapyhackrf/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig +, hackrf, soapysdr +} : + +let + version = "0.3.2"; + +in stdenv.mkDerivation { + name = "soapyhackrf-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapyHackRF"; + rev = "soapy-hackrf-${version}"; + sha256 = "1sgx2nk8yrzfwisjfs9mw0xwc47bckzi17p42s2pbv7zcxzpb66p"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ hackrf soapysdr ]; + + cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapyHackRF; + description = "SoapySDR plugin for HackRF devices"; + license = licenses.mit; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/soapyremote/default.nix b/pkgs/applications/misc/soapyremote/default.nix new file mode 100644 index 000000000000..d10b09f99a8d --- /dev/null +++ b/pkgs/applications/misc/soapyremote/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, cmake, soapysdr }: + +let + version = "0.4.3"; + +in stdenv.mkDerivation { + name = "soapyremote-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapyRemote"; + rev = "d07f43863b1ef79252f8029cfb5947220f21311d"; + sha256 = "0i101dfqq0aawybv0qyjgsnhk39dc4q6z6ys2gsvwjhpf3d48aw0"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ soapysdr ]; + + cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapyRemote; + description = "SoapySDR plugin for remote access to SDRs"; + license = licenses.boost; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/soapysdr/default.nix b/pkgs/applications/misc/soapysdr/default.nix new file mode 100644 index 000000000000..6230f2f6f6a6 --- /dev/null +++ b/pkgs/applications/misc/soapysdr/default.nix @@ -0,0 +1,50 @@ +{ stdenv, lib, lndir, makeWrapper +, fetchFromGitHub, cmake +, libusb, pkgconfig +, python, swig2, numpy, ncurses +, extraPackages ? [] +} : + +let + version = "0.6.1"; + +in stdenv.mkDerivation { + name = "soapysdr-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapySDR"; + rev = "soapy-sdr-${version}"; + sha256 = "1azbb2j6dv0b2dd5ks6yqd31j17sdhi9p82czwc8zy2isymax0l9"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ libusb ncurses numpy swig2 python ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DUSE_PYTHON_CONFIG=ON" + ]; + + postFixup = lib.optionalString (lib.length extraPackages != 0) '' + # Join all plugins via symlinking + for i in ${toString extraPackages}; do + ${lndir}/bin/lndir -silent $i $out + done + + # Needed for at least the remote plugin server + for file in out/bin/*; do + ${makeWrapper}/bin/wrapProgram "$file" \ + --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.makeSearchPath "lib/SoapySDR/modules0.6" extraPackages} + done + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapySDR; + description = "Vendor and platform neutral SDR support library"; + license = licenses.boost; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/applications/misc/soapyuhd/default.nix b/pkgs/applications/misc/soapyuhd/default.nix new file mode 100644 index 000000000000..4f2a79c97fe2 --- /dev/null +++ b/pkgs/applications/misc/soapyuhd/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig +, uhd, boost, soapysdr +} : + +let + version = "0.3.4"; + +in stdenv.mkDerivation { + name = "soapyuhd-${version}"; + + src = fetchFromGitHub { + owner = "pothosware"; + repo = "SoapyUHD"; + rev = "soapy-uhd-${version}"; + sha256 = "1da7cjcvfdqhgznm7x14s1h7lwz5lan1b48akw445ah1vxwvh4hl"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ uhd boost soapysdr ]; + + cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; + + postPatch = '' + sed -i "s:DESTINATION .*uhd/modules:DESTINATION $out/lib/uhd/modules:" CMakeLists.txt + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/pothosware/SoapyAirspy; + description = "SoapySDR plugin for UHD devices"; + license = licenses.gpl3; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5e8b16e017c..b93998838234 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11464,6 +11464,29 @@ with pkgs; snappy = callPackage ../development/libraries/snappy { }; + soapyairspy = callPackage ../applications/misc/soapyairspy { }; + + soapybladerf = callPackage ../applications/misc/soapybladerf { }; + + soapyhackrf = callPackage ../applications/misc/soapyhackrf { }; + + soapysdr = callPackage ../applications/misc/soapysdr { inherit (python3Packages) python numpy; }; + + soapyremote = callPackage ../applications/misc/soapyremote { }; + + soapysdr-with-plugins = callPackage ../applications/misc/soapysdr { + inherit (python3Packages) python numpy; + extraPackages = [ + soapyairspy + soapybladerf + soapyhackrf + soapyremote + soapyuhd + ]; + }; + + soapyuhd = callPackage ../applications/misc/soapyuhd { }; + socket_wrapper = callPackage ../development/libraries/socket_wrapper { }; sofia_sip = callPackage ../development/libraries/sofia-sip { }; From e0d33717282a3fba85840c01ae8ac485832fed93 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 25 Apr 2018 11:54:41 -0700 Subject: [PATCH 2/6] limesuite: init at 18.04.1 --- pkgs/applications/misc/limesuite/default.nix | 55 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/applications/misc/limesuite/default.nix diff --git a/pkgs/applications/misc/limesuite/default.nix b/pkgs/applications/misc/limesuite/default.nix new file mode 100644 index 000000000000..e166c7a6b516 --- /dev/null +++ b/pkgs/applications/misc/limesuite/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchFromGitHub, cmake +, sqlite, wxGTK30, libusb1, soapysdr +, mesa_glu, libX11, gnuplot, fltk +} : + +let + version = "18.04.1"; + +in stdenv.mkDerivation { + name = "limesuite-${version}"; + + src = fetchFromGitHub { + owner = "myriadrf"; + repo = "LimeSuite"; + rev = "v${version}"; + sha256 = "1aaqnwif1j045hvj011k5dyqxgxx72h33r4al74h5f8al81zvzj9"; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + libusb1 + sqlite + wxGTK30 + fltk + gnuplot + libusb1 + soapysdr + mesa_glu + libX11 + ]; + + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; + + postInstall = '' + mkdir -p $out/lib/udev/rules.d + cp ../udev-rules/64-limesuite.rules $out/lib/udev/rules.d + + mkdir -p $out/share/limesuite + cp bin/Release/lms7suite_mcu/* $out/share/limesuite + + cp bin/dualRXTX $out/bin + cp bin/basicRX $out/bin + cp bin/singleRX $out/bin + ''; + + meta = with stdenv.lib; { + description = "Driver and GUI for LMS7002M-based SDR platforms"; + homepage = https://github.com/myriadrf/LimeSuite; + license = licenses.apache2; + maintainers = with maintainers; [ markuskowa ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b93998838234..1b6135c4dbcb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3513,6 +3513,8 @@ with pkgs; libwebsockets = callPackage ../development/libraries/libwebsockets { }; + limesuite = callPackage ../applications/misc/limesuite { }; + limesurvey = callPackage ../servers/limesurvey { }; linuxquota = callPackage ../tools/misc/linuxquota { }; @@ -11477,6 +11479,7 @@ with pkgs; soapysdr-with-plugins = callPackage ../applications/misc/soapysdr { inherit (python3Packages) python numpy; extraPackages = [ + limesuite soapyairspy soapybladerf soapyhackrf From 7ba275410139c664354557f152ff8739631f498e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 25 Apr 2018 11:58:50 -0700 Subject: [PATCH 3/6] welle-io: add soapysdr support --- pkgs/applications/misc/welle-io/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/welle-io/default.nix b/pkgs/applications/misc/welle-io/default.nix index d705de1a8cd6..b3a9a3f3b86b 100644 --- a/pkgs/applications/misc/welle-io/default.nix +++ b/pkgs/applications/misc/welle-io/default.nix @@ -1,6 +1,6 @@ { stdenv, buildEnv, fetchFromGitHub, cmake, pkgconfig , qtbase, qtcharts, qtmultimedia, qtquickcontrols, qtquickcontrols2 -, faad2, rtl-sdr, libusb, fftwSinglePrec }: +, faad2, rtl-sdr, soapysdr-with-plugins, libusb, fftwSinglePrec }: let version = "1.0-rc2"; @@ -28,10 +28,11 @@ in stdenv.mkDerivation { qtquickcontrols qtquickcontrols2 rtl-sdr + soapysdr-with-plugins ]; cmakeFlags = [ - "-DRTLSDR=true" + "-DRTLSDR=true" "-DSOAPYSDR=true" ]; enableParallelBuilding = true; From 683b91ea1083b39958939f487f31e4aaabfa4996 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 25 Apr 2018 12:59:23 -0700 Subject: [PATCH 4/6] limesuite: fix license --- pkgs/applications/misc/limesuite/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/limesuite/default.nix b/pkgs/applications/misc/limesuite/default.nix index e166c7a6b516..fb1ef8fb6696 100644 --- a/pkgs/applications/misc/limesuite/default.nix +++ b/pkgs/applications/misc/limesuite/default.nix @@ -47,7 +47,7 @@ in stdenv.mkDerivation { meta = with stdenv.lib; { description = "Driver and GUI for LMS7002M-based SDR platforms"; homepage = https://github.com/myriadrf/LimeSuite; - license = licenses.apache2; + license = licenses.asl20; maintainers = with maintainers; [ markuskowa ]; platforms = platforms.linux; }; From 42297b0e1ce0198fa87b3b1d31c2057707ad4611 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 25 Apr 2018 14:44:03 -0700 Subject: [PATCH 5/6] limesuite: removed unnecessary cmakeFlag --- pkgs/applications/misc/limesuite/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/misc/limesuite/default.nix b/pkgs/applications/misc/limesuite/default.nix index fb1ef8fb6696..4599fab0c6d6 100644 --- a/pkgs/applications/misc/limesuite/default.nix +++ b/pkgs/applications/misc/limesuite/default.nix @@ -30,8 +30,6 @@ in stdenv.mkDerivation { libX11 ]; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; - postInstall = '' mkdir -p $out/lib/udev/rules.d cp ../udev-rules/64-limesuite.rules $out/lib/udev/rules.d From c35dc53e5652e85a7692ef1f0176f80c7ebc406a Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 26 Apr 2018 01:17:40 -0700 Subject: [PATCH 6/6] welle-io: remove aarch64 from platform flags --- pkgs/applications/misc/welle-io/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/misc/welle-io/default.nix b/pkgs/applications/misc/welle-io/default.nix index b3a9a3f3b86b..143ec518ac51 100644 --- a/pkgs/applications/misc/welle-io/default.nix +++ b/pkgs/applications/misc/welle-io/default.nix @@ -42,7 +42,6 @@ in stdenv.mkDerivation { homepage = http://www.welle.io/; maintainers = with maintainers; [ ck3d ]; license = licenses.gpl2; - platforms = with platforms; linux ++ darwin; + platforms = with platforms; [ "x86_64-linux" "i686-linux" ] ++ darwin; }; - }