1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

nixgl: forward override calls to wrapped package

This commit is contained in:
Mel Bourgeois 2024-11-01 23:22:59 -05:00
parent e83414058e
commit 235fc0101a
No known key found for this signature in database
GPG key ID: 290FCF081AEDB3EC

View file

@ -184,7 +184,7 @@ in {
else
# Wrap the package's binaries with nixGL, while preserving the rest of
# the outputs and derivation attributes.
(pkg.overrideAttrs (old: {
((pkg.overrideAttrs (old: {
name = "nixGL-${pkg.name}";
# Make sure this is false for the wrapper derivation, so nix doesn't expect
@ -203,7 +203,8 @@ in {
in ''
set -eo pipefail
${ # Heavily inspired by https://stackoverflow.com/a/68523368/6259505
${
# Heavily inspired by https://stackoverflow.com/a/68523368/6259505
lib.concatStringsSep "\n" (map (outputName: ''
echo "Copying output ${outputName}"
set -x
@ -240,7 +241,11 @@ in {
shopt -u nullglob # Revert nullglob back to its normal default state
'';
}));
})) // {
# Override arguments to the package itself, rather than the nixGL wrapper
override = args:
(makePackageWrapper vendor environment (pkg.override args));
});
wrappers = {
mesa = makePackageWrapper "Intel" { };