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"
```
Netaddr 1.1.0 changes the behavior for partial address expansion, making
two tests fail:
- test_get_user_by_req_appservice_valid_token_bad_ip
- test_get_user_by_req_appservice_valid_token_good_ip
Drops extra arguments on the package, as they will be moved over into
the module in a more discoverable way next.
Also reduces overly broad `with`-scoping.
On high core machines those easily can fail similar to:
matrix-synapse> tests.storage.test_room_search.MessageSearchTest.test_postgres_web_search_for_phrase
matrix-synapse> ===============================================================================
matrix-synapse> [ERROR]
matrix-synapse> Traceback (most recent call last):
matrix-synapse> File "/build/source/tests/unittest.py", line 122, in new
matrix-synapse> return code(orig, *args, **kwargs)
matrix-synapse> File "/build/source/tests/unittest.py", line 216, in setUp
matrix-synapse> return orig()
matrix-synapse> File "/build/source/tests/unittest.py", line 338, in setUp
matrix-synapse> self.hs = self.make_homeserver(self.reactor, self.clock)
matrix-synapse> File "/build/source/tests/app/test_openid_listener.py", line 34, in make_homeserver
matrix-synapse> hs = self.setup_test_homeserver(
matrix-synapse> File "/build/source/tests/unittest.py", line 606, in setup_test_homeserver
matrix-synapse> hs = setup_test_homeserver(self.addCleanup, **kwargs)
matrix-synapse> File "/build/source/tests/server.py", line 921, in setup_test_homeserver
matrix-synapse> prepare_database(
matrix-synapse> File "/nix/store/2cc0p5apn2yg2fr5ii9mvb7fcwd74y26-matrix-synapse-1.86.0/lib/python3.10/site-packages/synapse/storage/prepare_database.py", line 155, in prepare_database
matrix-synapse> raise UpgradeDatabaseException(EMPTY_DATABASE_ON_WORKER_ERROR)
matrix-synapse> synapse.storage.prepare_database.UpgradeDatabaseException: Uninitialised database: run the main synapse process to prepare the database schema before starting worker processes.
matrix-synapse>