Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixgl: forward override calls to wrapped package #6029

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions modules/misc/nixgl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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));
Smona marked this conversation as resolved.
Show resolved Hide resolved
});

wrappers = {
mesa = makePackageWrapper "Intel" { };
Expand Down