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"
```
the new version stamps out further path-related annoyances, though
it does require explicitly giving PLAN9_TARGET during buildPhase
(everything moves to $out during installPhase anyway, where
./INSTALL works it out unassisted).
The presence of '+' in version string propagates to PATH variable, which breaks
`u` script, because `u` uses p9p's `sed` that treats `+` as a metacharacter.
Because of this, the version string will be reverted.
The install script was escaping the Nix environment on Mac OS by using
`xcrun -sdk macos clang` as its C compiler. Using the Nix compiler
required declaring the necessary frameworks as inputs and patching
build scripts to assume MacOS 10.12 (and not try to detect).
So cached derivations prior to this would probably not work on all
intended target machines.
This *might* also fix installCheck on Darwin on Hydra.
Other minor fixes:
* Disable parallel building due to a race with a missing y.tab.h
* Use NIX_CFLAGS_COMPILE/NIX_LDFLAGS instead of trying to synthesize
something like them.
* X11 dependencies aren't used on Darwin when the windowing system
is correctly detected
A commit in 2014 (see #2266) disabled building parts which depended on
X11 on Mac OS. There's no explanation given in the pull request. In
any case, many people install plan9port on Darwin specifically to use
the UI components.
Aside from this, the derivation was broken on Mac OS, probably because
people put the `which` and `perl` dependencies inside the !isDarwin
conditional. Some programs worked, however the static libraries did
not build, so this could not be used as a buildInput to build programs
which need the libraries. This fixes that.
* pkgs: refactor needless quoting of homepage meta attribute
A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.
* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit
* Fixed some instances
Fixing interpreter paths was done by exporting PLAN9_TARGET, which
INSTALL looks at. Giving $PLAN9 to INSTALL does not achieve this, as
INSTALL only looks at its first argument so I removed the other
arguments to avoid confusion.
Perl is an optional dependency for a script that adds URLs to man pages,
I have added it to get fewer errors during install.
* Add "which" dependency, otherwise it builds with lots of
"command not found" errors.
* -lgcc_s, otherwise many commands basically fail without pthread_cancel.
* Fix X11 dependencies, otherwise it would be plan9port with none of UI
programs working.