nixpkgs/pkgs/applications/terminal-emulators/x3270/default.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
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"
```
2024-09-25 00:04:37 +03:00

82 lines
1.5 KiB
Nix

{ stdenv
, darwin
, lib
, libiconv
, fetchurl
, m4
, expat
, libX11
, libXt
, libXaw
, libXmu
, bdftopcf
, mkfontdir
, fontadobe100dpi
, fontadobeutopia100dpi
, fontbh100dpi
, fontbhlucidatypewriter100dpi
, fontbitstream100dpi
, tcl
, ncurses
, openssl
, readline
}:
let
majorVersion = "4";
minorVersion = "3";
versionSuffix = "ga8";
in
stdenv.mkDerivation rec {
pname = "x3270";
version = "${majorVersion}.${minorVersion}${versionSuffix}";
src = fetchurl {
url =
"http://x3270.bgp.nu/download/0${majorVersion}.0${minorVersion}/suite3270-${version}-src.tgz";
sha256 = "sha256-gcC6REfZentIPEDhGznUSYu8mvVfpPeMz/Bks+N43Fk=";
};
buildFlags = lib.optional stdenv.hostPlatform.isLinux "unix";
configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"--enable-c3270"
"--enable-pr3270"
"--enable-s3270"
"--enable-tcl3270"
];
postBuild = ''
make install.man
'';
pathsToLink = [ "/share/man" ];
nativeBuildInputs = [ m4 ];
buildInputs = [
expat
libX11
libXt
libXaw
libXmu
bdftopcf
mkfontdir
fontadobe100dpi
fontadobeutopia100dpi
fontbh100dpi
fontbhlucidatypewriter100dpi
fontbitstream100dpi
tcl
ncurses
expat
openssl
readline
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
meta = with lib; {
description = "IBM 3270 terminal emulator for the X Window System";
homepage = "http://x3270.bgp.nu/index.html";
license = licenses.bsd3;
maintainers = [ maintainers.anna328p ];
};
}