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"
```
Adding `libxcrypt` as a dependency is required to avoid a link time
error from an undefined reference to `crypt` in non-TLS-enabled builds
now that glibc crypt support is optional[0].
Additionally, many of the `nativeBuildInputs` should be `buildInputs`
since they are used at runtime and not build time. This is also fixed in
this commit.
[0]: ff30c899d8
LDMud is a game engine for text based multi-user dungeon games (MUDs),
in the "LP" heritage. In essence it is a virtual machine that allows
developers to implement MUD games ("mudlibs" in LD parlance) using the
LPC programming language.
In the project's own words:
> This is 'LDMud', a gamedriver for LPMuds. (LPC compiler, interpreter
> and runtime environment.)
>
> LDMud started as a project to clean up and modernize Amylaar's LPMud
> gamedriver. Primary goals are full documentation, a commented source
> body and out-of-the-box support for the major mudlibs, of which the
> commented source body has been pretty much completed. During the course
> of work a lot of bug fixes and improvements found their way into the
> driver - much more than originally expected, and definitely enough to
> make LDMud a driver in its own right.
For nixpkgs the new LDMud addition is largely a standard derivation for
an autoreconf/automake based project. Some small tweaks are required to
get everything lined up between the Nix environment and the LDMud build
system.
The new LDMud derivation is placed in `pkgs/games/ldmud/` alongside
other MUD-related projects in the games category (e.g. `mudlet`,
`blightmud`).
LD offers a variety of optional features, some of which require heavier
dependencies (e.g. MySQL/Postgres client libraries). To support both
a minimal default build equal to what one gets using the upstream build
with no customization, and to also support a more useful fully featured
build, the LDMud derivation is added to `all-packages.nix` twice:
1. the `ldmud` attribute builds the minimal default configuration (just
the optional gcrypt and pcre options enabled, matching upstream).
2. the `ldmud-full` attribute builds LDMud with all of the optional
features enabled (database support, Python support, TLS support,
etc).