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

bug: config.lib.nixGL.wrap overrides programs.chromium.commandLineArgs #6016

Open
2 tasks done
DamienCassou opened this issue Oct 29, 2024 · 2 comments · May be fixed by #6029
Open
2 tasks done

bug: config.lib.nixGL.wrap overrides programs.chromium.commandLineArgs #6016

DamienCassou opened this issue Oct 29, 2024 · 2 comments · May be fixed by #6029
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@DamienCassou
Copy link
Contributor

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

In #5355, @Smona, @vigress8, @rycee, @exzombie and a few others collaborated to add the nixGL modules. This is great as it simplifies my configuration. Thank you very much.

Nevertheless, the support for Chromium seems problematic.

Here is an example configuration:

{
  programs.chromium = {
    enable = true;
    package = config.lib.nixGL.wrap pkgs.ungoogled-chromium;
    commandLineArgs = [
      "--extension-mime-request-handling=always-prompt-for-install"
      "--enable-features=ClearDataOnExit"
      "--no-default-browser-check"
      "--incognito"
    ];
  };
}

This generates a chromium executable script which doesn't contain my commandLineArgs anymore.

Workaround: remove config.lib.nixGL.wrap from programs.chromium.package to get the command line arguments back.

Maintainer CC

@Smona

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.11.4-201.fc40.x86_64, Fedora Linux, 40 (Workstation Edition), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.9`
 - channels(root): `"nixpkgs"`
 - channels(temp): `"home-manager, nixpxkgs"`
 - channels(cassou): `"home-manager-22.11.tar.gz, nixpkgs"`
 - nixpkgs: `/home/cassou/Documents/projects/nix-system/nixpkgs`
@DamienCassou DamienCassou added bug triage Issues or feature request that have not been triaged yet labels Oct 29, 2024
@Smona
Copy link
Contributor

Smona commented Oct 29, 2024

Looks like this would happen because the commandLineArgs are added in the buildCommand of chromium, which is overridden by the nixGL wrapper. We may need to try and extend the buildCommand instead of replacing it to fix this in all cases, but we'll have to see if that triggers a bunch of long package builds. Hopefully we won't have to implement a special case for wrapper packages like this one.

@Smona
Copy link
Contributor

Smona commented Oct 31, 2024

I wonder if we could override override on the wrapper derivation returned by nixGL.wrap, so that it basically maps (nixGL.wrap pkg).override { args } to (nixGL.wrap (pkg.override { args })).

@Smona Smona linked a pull request Nov 2, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants