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>
No idea why, but the tests - a random amount of tests to be precise -
fail on aarch64 on each attempt I made. Not reproducible on
x86_64-linux. Disabling parallelism appears to solve the issue.
https://github.com/NixOS/nixpkgs/pull/192197 broke these packages by adding
systemd as a dependency. This meant that the included package was no longer the
python3 systemd package, but the general systemd derivation. This broke the
packages at runtime. This PR fixes that.
Many packages have some kind of flag indicating whether or not to build with
systemd support. Most of these default to `stdenv.isLinux`, but systemd does
not build on (and is marked `broken` for) `isStatic`. Only a few packages have
the needed `&& !isStatic` in the default value for their parameter.
This commit moves the logic for the default value of these flags into
`systemd.meta.{platforms,badPlatforms}` and evaluates those conditions using
`lib.meta.availableOn`.
This provides three benefits:
1. The default values are set correctly (i.e. including `&& isStatic`)
2. The default values are set consistently
3. The way is paved for any future non-Linux systemd platforms (FreeBSD is
reported to have experimental systemd support)
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.