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

Merge ungoogled-chromium back into the chromium expressions #106475

Merged
merged 2 commits into from Dec 17, 2020

Conversation

primeos
Copy link
Member

@primeos primeos commented Dec 9, 2020

Motivation for this change

Resolve #102965.
cc @squalus

My additional changes for this merge:
https://github.com/primeos/nixpkgs/compare/ungoogled-chromium-merge-no-changes..primeos:ungoogled-chromium-merge
git diff primeos/ungoogled-chromium-merge-no-changes primeos/ungoogled-chromium-merge (unfortunately it seems like the GitHub UI can only diff primeos/ungoogled-chromium-merge-no-changes...primeos/ungoogled-chromium-merge)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@primeos
Copy link
Member Author

primeos commented Dec 9, 2020

Btw this is the nix-diff output (explains the rebuild that the second commit causes, s. commit message):

$ nix-diff /nix/store/nl4b0hwiaaahpfr910qhamr6r70j70cv-ungoogled-chromium-87.0.4280.88.drv /nix/store/z2br0hkbvrgbqdmwyzr5a5ignn5rhs43-ungoogled-chromium-87.0.4280.88.drv
- /nix/store/nl4b0hwiaaahpfr910qhamr6r70j70cv-ungoogled-chromium-87.0.4280.88.drv:{out}
+ /nix/store/z2br0hkbvrgbqdmwyzr5a5ignn5rhs43-ungoogled-chromium-87.0.4280.88.drv:{out}
• The input named `chromium-unwrapped-87.0.4280.88` differs
  - /nix/store/iddxb9yrhc6anvz3c3blbrcfvr8hmkn7-chromium-unwrapped-87.0.4280.88.drv:{out,sandbox}
  + /nix/store/jx2dbhdgwkhn10q77wlyj4bfhjjh01fl-chromium-unwrapped-87.0.4280.88.drv:{out,sandbox}
  • The environments do not match:
      channel=stabungoogled-chromium
• Skipping environment comparison

The color is missing but it's basically channel=stable vs. channel=ungoogled-chromium in /nix/store/iddxb9yrhc6anvz3c3blbrcfvr8hmkn7-chromium-unwrapped-87.0.4280.88.drv. AFAIK channel shouldn't even be set as environment variable (probably happened on accident due to the complexity of common.nix) but that seems outside the scope of this PR. Anyway, the two outputs/realizations of the derivation should remain unchanged (assuming none of the build scripts happen to read an environment variable called channel).

I used nix-instantiate to verify that the derivations for chromium and
ungoogled-chromium remain unchanged (only the meta attributes change
slightly as I added myself as ungoogled-chromium to receive
notifications for PRs/issues).
This also adds a dedicated channel for ungoogled-chromium that enables
us to update ungoogled-chromium independently of chromium.
TODO: Automate ungoogled-chromium updates via update.py (currently it
needs to be updated manually).

Note: Unfortunately this changes the ungoogled-chromium derivation
because common.nix passes the channel as an argument to
stdenv.mkDerivation (this makes it more difficult to verify this commit
but the result should remain the same).
@primeos
Copy link
Member Author

primeos commented Dec 17, 2020

Let's give it a try :)

@primeos primeos merged commit f5944b7 into NixOS:master Dec 17, 2020
@squalus
Copy link
Member

squalus commented Dec 18, 2020

Looks great! Thanks for doing this.

@ajs124
Copy link
Member

ajs124 commented Dec 18, 2020

I think this broke unstable-small, see https://hydra.nixos.org/build/133143744 or rather https://nix-cache.s3.amazonaws.com/log/74kfh3pc10y5iin2r6crplabd0ky6vq4-nixpkgs-tarball-21.03pre258838.85298db412b.drv

primeos added a commit that referenced this pull request Dec 18, 2020
This should fix a regression from #106475 (hopefully this is the only
issue, my current implementation with channel+ungoogled isn't ideal):
#106475 (comment)
@primeos
Copy link
Member Author

primeos commented Dec 18, 2020

@ajs124 thanks for notifying me! be94a4c should hopefully fix it (not completely sure if there was a second problem - I was actually aware of this one but didn't expect that Hydra would try to evaluate ungoogled-chromium.chromeSrc - my bad, sorry about that - but it seems like it will eagerly evaluate all attributes, even if they're not required/used anywhere).

@primeos
Copy link
Member Author

primeos commented Dec 18, 2020

Yay, the fix worked: https://hydra.nixos.org/build/133146064

@squalus and I just pushed 94bee10 so you should now be able to update ungoogled-chromium by simply running pkgs/applications/networking/browsers/chromium/update.py ;)

@r3v2d0g
Copy link
Contributor

r3v2d0g commented Dec 20, 2020

Hey @primeos! It seems your last commit is now making my configuration throw an error at me (Google Chrome is not supported for the ungoogled-chromium channel.) when trying to install the ungoogled-chromium package :/.

Edit: this only happens when I'm overriding pkgs.ungoogled-chromium to set enableWideVine to true. I think this line is to blame:

@primeos
Copy link
Member Author

primeos commented Dec 21, 2020

@r3v2d0g oh, that"s a bit unexpected. I didn't think anyone would like to combine ungoogled-chromium with Google's proprietary DRM technology but I guess why not (given that it's pretty difficult to avoid DRM nowadays... :o). I'll change the update script then to include the Google Chrome sources for the ungoogled-chromium channel as well.

@primeos
Copy link
Member Author

primeos commented Dec 22, 2020

@r3v2d0g could you please test if 86ff1e4 works as expected (I only verified that it builds)?

@r3v2d0g
Copy link
Contributor

r3v2d0g commented Dec 22, 2020

@primeos Yes, this is now works as expected! Thank you for taking the time to fix this :)

primeos added a commit to primeos/nixpkgs that referenced this pull request Jan 3, 2021
This should fix a regression from NixOS#106475 (hopefully this is the only
issue, my current implementation with channel+ungoogled isn't ideal):
NixOS#106475 (comment)

(cherry picked from commit be94a4c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge ungoogled-chromium back into the chromium expressions?
4 participants