nixpkgs/pkgs/by-name/sp/splat/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

57 lines
1.4 KiB
Nix

{ 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; {
broken = stdenv.hostPlatform.isDarwin;
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.x86_64;
};
}