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 { };