This is just useful things I've found while diffing our kernel configs
with Arch and Fedora. Some of these have a small performance overhead,
most are completely free.
Switch default performance governor to schedutil, because performance
is almost always a bad default.
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
As per https://docs.kernel.org/sound/designs/powersave.html
We update our defaults for better power saving on laptops
which does not perform powertop --auto-tune, TLP or manual tweaking, e.g.
power-profiles-daemon.
- Drop the patches in favor of patching up the xcodeproj files, which
should make updates in the future easier (no more patch conflicts);
- Switch to building `MoltenVKPackaging.xcodeproj` instead of building
the projects individually;
- Link `libMoltenVK.dylib` manually, which is needed for MoltenVK 1.2.8
due to xcbuild not being able to build the dylib in the xcodeproj;
- Add support for enabling private API usage and default it to `true`.
This will be a new feature in MoltenVK 1.2.8;
- Use darwin.apple_sdk.libs.simd instead of symlinking from the SDK;
- Filter out rc and beta releases in the update script; and
- Support static builds of MoltenVK.
Currently things like `buildLinux { inherit src version; }` fail because of
`callPackage` auto-inserting `kernelPatches`, which is both a `buildLinux`
argument and a `pkgs` toplevel attribute, with completely different semantics.
Avoid that entirely by splitting the call into two - one for arguments we want
from `callPackage`, and one for everything else.
This PR refactor CUDA setup hooks, and in particular
autoAddOpenGLRunpath and autoAddCudaCompatRunpathHook, that were using a
lot of code in common (in fact, I introduced the latter by copy pasting
most of the bash script of the former). This is not satisfying for
maintenance, as a recent patch showed, because we need to duplicate
changes to both hooks.
This commit abstract the common part in a single shell script that
applies a generic patch action to every elf file in the output. For
autoAddOpenGLRunpath the action is just addOpenGLRunpath (now
addDriverRunpath), and is few line function for
autoAddCudaCompatRunpathHook.
Doing so, we also takes the occasion to use the newer addDriverRunpath
instead of the previous addOpenGLRunpath, and rename the CUDA hook to
reflect that as well.
Co-Authored-By: Connor Baker <connor.baker@tweag.io>