mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-25 06:13:54 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
57 lines
1.4 KiB
Nix
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;
|
|
};
|
|
|
|
}
|