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"
```
Fixes#185095.
Added gnused to smartmontools regardless of `enableMail`.
The previous fix only works when `enableMail = true`.
Also fixing this while I'm at it:
```
warning: String 'configureFlags' is deprecated and will be removed in release 23.05. Please use a list of strings.
```
Fixes#185095.
Added `gnused` to `smartmontools`.
`/etc/smartd_warning.sh` requires `sed` to be in the path.
Previously failing with:
```
Test of /nix/store/134ckj3riid6ss5iy91b6b14bqyi7qf3-smartd-notify.sh to <nomailer> produced unexpected output (118 bytes) to STDOUT/STDERR:
/nix/store/hhfr3ih96hzgxhhmjxbns726qx6mfff1-smartmontools-7.3/etc/smartd_warning.sh: line 125: sed: command not found
Test of /nix/store/134ckj3riid6ss5iy91b6b14bqyi7qf3-smartd-notify.sh to <nomailer>: failed (32-bit/8-bit exit status: 32512/127)
```
Not so much because newer is better, but it seems the behavior of the
sourceforge raw download changed with respect to `$Id$`, so this gets
things in sync again (#113894)
mailutils depends on OpenSSL 1.0.2, which is marked as insecure and thus
prevents this package from being built on Hydra. Excluding it by default
should re-enable binary builds for users who don't need the email
feature.
This change is unlikely to cause a major disruption because there's an
existing NixOS module for smartd that handles email notifications. It
works without this package being dependant on mailutils. Since mailutils
isn't used for any other purpose besides providing email notification
for smartd, it's possible to drop it without feature loss.
This change also makes the dependance on inetutils optional. inetutils
is needed for the 'hostname' command, and is only used for providing
email support.