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:
parent
e83414058e
commit
235fc0101a
1 changed files with 8 additions and 3 deletions
|
@ -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" { };
|
||||
|
|
Loading…
Reference in a new issue