about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2022-04-08 17:14:42 +0100
committerGitHub <noreply@github.com>2022-04-08 17:14:42 +0100
commitb12cbdb8fbe035f40bb10212bc8ea1d07b4b406e (patch)
tree194b4b894b0d2cd5ea834cff6dfbab39f9183718
parent8be8cc6a7bc5fe95c102e34fcf51475485126cf3 (diff)
parenta52c01340d6fca30d3204c8ac57ccc60b46a4655 (diff)
Merge pull request #162786 from ehmry/splat
splat: init at 1.4.2
-rw-r--r--pkgs/applications/radio/splat/default.nix55
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/radio/splat/default.nix b/pkgs/applications/radio/splat/default.nix
new file mode 100644
index 0000000000000..2e929ff04ef2a
--- /dev/null
+++ b/pkgs/applications/radio/splat/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, groff, ncurses, bzip2, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "splat";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "https://www.qsl.net/kd2bd/${pname}-${version}.tar.bz2";
+    hash = "sha256-ObCzFOLpJ73wDR7aS5hl79EouoUDBfmHrsBJxP1Yopw=";
+  };
+
+  nativeBuildInputs =
+    # configure script needs `clear`
+    [ groff ncurses ];
+
+  buildInputs = [ bzip2 zlib ];
+
+  postPatch = "patchShebangs build utils/build";
+
+  configurePhase =
+    # configure for maximum resolution
+    ''
+      runHook preConfigure
+      cat > std-params.h << EOF
+      #define HD_MODE 1
+      #define MAXPAGES 64
+      EOF
+      runHook postConfigure
+    '';
+
+  buildPhase = ''
+    runHook preBuild
+    ./build all
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/bin splat
+    find utils -type f -executable -exec install -Dt $out/bin {} \;
+    install -Dt $out/share/man/man1 docs/english/man/*.1
+    install -Dt $out/share/man/es/man1 docs/spanish/man/*.1
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description =
+      "SPLAT! is an RF Signal Propagation, Loss, And Terrain analysis tool for the electromagnetic spectrum between 20 MHz and 20 GHz";
+    license = licenses.gpl2Only;
+    homepage = "https://www.qsl.net/kd2bd/splat.html";
+    maintainers = with maintainers; [ ehmry ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2a703841e94cf..1a25320ee951c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -20301,6 +20301,8 @@ with pkgs;
 
   spirv-cross = callPackage ../tools/graphics/spirv-cross { };
 
+  splat = callPackage ../applications/radio/splat { };
+
   sratom = callPackage ../development/libraries/audio/sratom { };
 
   srm = callPackage ../tools/security/srm { };