@@ -0,0 +1,55 @@
1+{ lib, stdenv, fetchurl, groff, ncurses, bzip2, zlib }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "splat";
5+ version = "1.4.2";
6+
7+ src = fetchurl {
8+ url = "https://www.qsl.net/kd2bd/${pname}-${version}.tar.bz2";
9+ hash = "sha256-ObCzFOLpJ73wDR7aS5hl79EouoUDBfmHrsBJxP1Yopw=";
10+ };
11+
12+ nativeBuildInputs =
13+ # configure script needs `clear`
14+ [ groff ncurses ];
15+
16+ buildInputs = [ bzip2 zlib ];
17+
18+ postPatch = "patchShebangs build utils/build";
19+
20+ configurePhase =
21+ # configure for maximum resolution
22+ ''
23+ runHook preConfigure
24+ cat > std-params.h << EOF
25+ #define HD_MODE 1
26+ #define MAXPAGES 64
27+ EOF
28+ runHook postConfigure
29+ '';
30+
31+ buildPhase = ''
32+ runHook preBuild
33+ ./build all
34+ runHook postBuild
35+ '';
36+
37+ installPhase = ''
38+ runHook preInstall
39+ install -Dt $out/bin splat
40+ find utils -type f -executable -exec install -Dt $out/bin {} \;
41+ install -Dt $out/share/man/man1 docs/english/man/*.1
42+ install -Dt $out/share/man/es/man1 docs/spanish/man/*.1
43+ runHook postInstall
44+ '';
45+
46+ meta = with lib; {
47+ description =
48+ "SPLAT! is an RF Signal Propagation, Loss, And Terrain analysis tool for the electromagnetic spectrum between 20 MHz and 20 GHz";
49+ license = licenses.gpl2Only;
50+ homepage = "https://www.qsl.net/kd2bd/splat.html";
51+ maintainers = with maintainers; [ ehmry ];
52+ platforms = platforms.linux;
53+ };
54+
55+}