about summary refs log tree commit diff
path: root/pkgs/applications/radio
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2019-02-09 15:59:52 +0100
committerElis Hirwing <elis@hirwing.se>2019-02-09 21:38:35 +0100
commit261472e8958276e64c6bb917a14e2ea5613f2d1b (patch)
tree52775c912638dd8871b0cb63e25d87d0036b762c /pkgs/applications/radio
parentabd8c2f16860dcfefb17385aaf211fa916f490c9 (diff)
downloadnixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar.gz
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar.bz2
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar.lz
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar.xz
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.tar.zst
nixlib-261472e8958276e64c6bb917a14e2ea5613f2d1b.zip
wsjtx: Move from misc to radio
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r--pkgs/applications/radio/wsjtx/default.nix44
-rw-r--r--pkgs/applications/radio/wsjtx/super.patch12
-rw-r--r--pkgs/applications/radio/wsjtx/wsjtx.patch12
3 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/applications/radio/wsjtx/default.nix b/pkgs/applications/radio/wsjtx/default.nix
new file mode 100644
index 000000000000..930515b93825
--- /dev/null
+++ b/pkgs/applications/radio/wsjtx/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake,
+  docbook_xsl, fftw, fftwFloat, gfortran, libtool, qtbase,
+  qtmultimedia, qtserialport, texinfo, libusb1 }:
+
+stdenv.mkDerivation rec {
+  name = "wsjtx-${version}";
+  version = "2.0.0";
+
+  # This is a "superbuild" tarball containing both wsjtx and a hamlib fork
+  src = fetchurl {
+    url = "http://physics.princeton.edu/pulsar/k1jt/wsjtx-${version}.tgz";
+    sha256 = "66434f69f256742da1fe057ec51e4464cab2614f0bfb1a310c04a385b77bd014";
+  };
+
+  # Hamlib builds with autotools, wsjtx builds with cmake
+  # Omitting pkgconfig because it causes issues locating the built hamlib
+  nativeBuildInputs = [
+    asciidoc asciidoctor autoconf automake cmake docbook_xsl gfortran libtool
+    texinfo
+  ];
+  buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport ];
+
+  # Remove Git dependency from superbuild since sources are included
+  patches = [ ./super.patch ];
+
+  # Superbuild has its own patch step after it extracts the inner archives
+  postPatch = "cp ${./wsjtx.patch} wsjtx.patch";
+
+  meta = with stdenv.lib; {
+    description = "Weak-signal digital communication modes for amateur radio";
+    longDescription = ''
+      WSJT-X implements communication protocols or "modes" called FT8, JT4, JT9,
+      JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for
+      detecting and measuring your own radio signals reflected from the Moon.
+      These modes were all designed for making reliable, confirmed ham radio
+      contacts under extreme weak-signal conditions.
+    '';
+    homepage = http://physics.princeton.edu/pulsar/k1jt/wsjtx.html;
+    # Older licenses are for the statically-linked hamlib
+    license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.lasandell ];
+  };
+}
diff --git a/pkgs/applications/radio/wsjtx/super.patch b/pkgs/applications/radio/wsjtx/super.patch
new file mode 100644
index 000000000000..d903171ffc5a
--- /dev/null
+++ b/pkgs/applications/radio/wsjtx/super.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3bf97a4..2c9dce5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,7 +23,6 @@ source tarball." )
+ #
+ # Find_library (USB_LIBRARY NAMES libusb.a usb)
+ Find_program (PATCH_EXECUTABLE patch REQUIRED)
+-Find_package (Git REQUIRED)
+ 
+ #
+ # extra C flags to minimize hamlib excutable sizes
diff --git a/pkgs/applications/radio/wsjtx/wsjtx.patch b/pkgs/applications/radio/wsjtx/wsjtx.patch
new file mode 100644
index 000000000000..e92b420e58a4
--- /dev/null
+++ b/pkgs/applications/radio/wsjtx/wsjtx.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3e7e816b..e7dbb14a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -860,6 +860,7 @@ find_package (Qt5Widgets 5 REQUIRED)
+ find_package (Qt5Multimedia 5 REQUIRED)
+ find_package (Qt5PrintSupport 5 REQUIRED)
+ find_package (Qt5Sql 5 REQUIRED)
++find_package (Qt5SerialPort 5 REQUIRED)
+ 
+ if (WIN32)
+   add_definitions (-DQT_NEEDS_QTMAIN)