mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +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" ```
64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, autoreconfHook
|
|
, makeWrapper
|
|
, pkg-config
|
|
, lrzsz
|
|
, ncurses
|
|
, libiconv
|
|
, IOKit
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "minicom";
|
|
version = "2.9";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "salsa.debian.org";
|
|
owner = "minicom-team";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-+fKvHrApDXm94LItXv+xSDIE5zD7rTY5IeNSuzQglpg=";
|
|
};
|
|
|
|
buildInputs = [ ncurses ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv IOKit ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
configureFlags = [
|
|
"--sysconfdir=/etc"
|
|
"--enable-lock-dir=/var/lock"
|
|
];
|
|
|
|
patches = [ ./xminicom_terminal_paths.patch ];
|
|
|
|
preConfigure = ''
|
|
# Have `configure' assume that the lock directory exists.
|
|
substituteInPlace configure \
|
|
--replace 'test -d $UUCPLOCK' true
|
|
'';
|
|
|
|
postInstall = ''
|
|
for f in $out/bin/*minicom ; do
|
|
wrapProgram $f \
|
|
--prefix PATH : ${lib.makeBinPath [ lrzsz ]}:$out/bin
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Modem control and terminal emulation program";
|
|
homepage = "https://salsa.debian.org/minicom-team/minicom";
|
|
license = licenses.gpl2Plus;
|
|
longDescription = ''
|
|
Minicom is a menu driven communications program. It emulates ANSI
|
|
and VT102 terminals. It has a dialing directory and auto zmodem
|
|
download.
|
|
'';
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|