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

zen-browser: init at 1.0.1-a.16 #347222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

matthewpi
Copy link
Member

https://zen-browser.app/

Closes #327982

Needs testing on darwin and aarch64-linux systems.

NOTE: This package takes quite a lot of resources to build. On my desktop (7900X) and on my build server (5950X) the build takes upwards of about 30-35 minutes. This is not a package you want to compile yourself if you can avoid it.

If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.

@Zh40Le1ZOOB thanks for doing the legwork to get this packaged. I based this package on the one you linked in the associated package request, but merged in a bunch of the options from the firefox package already in nixpkgs.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@matthewpi matthewpi force-pushed the zen-browser branch 4 times, most recently from 4484966 to ddda268 Compare October 8, 2024 16:31
@Zh40Le1ZOOB
Copy link

If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.

Could you please add me as a maintainer? I'm really happy I could be a maintainer in Nixpkgs :D

@Titaniumtown
Copy link
Contributor

I too would like to be added as a maintainer for this package if possible :)

@matthewpi
Copy link
Member Author

If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.

Could you please add me as a maintainer? I'm really happy I could be a maintainer in Nixpkgs :D

In order to be added as a maintainer you need to have an entry in maintainers/maintainer-list.nix.

I'm not sure if I'm supposed to add you as nixpkgs would likely prefer users add themselves rather than getting someone else to do it for them.

@Titaniumtown
Copy link
Contributor

After ~2 hours on my laptop, it built. Typing from the browser right now! Seems functionally it works fine :)

@ofborg ofborg bot requested a review from Titaniumtown October 8, 2024 22:24
@Vinetos
Copy link
Member

Vinetos commented Oct 9, 2024

Hey !
I'm currently building the package on ~5 y/o laptop
I'll use the browser during this day looking for any bugs

Could I be added as a maintainer too ?
I would like to contribute to package and maintain this browser :D

@Zh40Le1ZOOB
Copy link

If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.

Could you please add me as a maintainer? I'm really happy I could be a maintainer in Nixpkgs :D

In order to be added as a maintainer you need to have an entry in maintainers/maintainer-list.nix.

I'm not sure if I'm supposed to add you as nixpkgs would likely prefer users add themselves rather than getting someone else to do it for them.

Is it allowed to add others to maintainers list in a pull request? Or may I add my self at next update? 🤔

@Vinetos
Copy link
Member

Vinetos commented Oct 9, 2024

If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.

Could you please add me as a maintainer? I'm really happy I could be a maintainer in Nixpkgs :D

In order to be added as a maintainer you need to have an entry in maintainers/maintainer-list.nix.
I'm not sure if I'm supposed to add you as nixpkgs would likely prefer users add themselves rather than getting someone else to do it for them.

Is it allowed to add others to maintainers list in a pull request? Or may I add my self at next update? 🤔

It is preferable for users to add themselves. At least, the commit must be authored and signed by the added user.

If @matthewpi gives you a write access to its fork's branch, you would be able to add yourself and the change will be in this MR.

@Vinetos
Copy link
Member

Vinetos commented Oct 9, 2024

Hey
I seems to have a build failure :

➜ nix run nixpkgs#nixpkgs-review -- pr --print-result 347222 --no-shell
[...]

[1/0/2 built] building zen-browser-unwrapped-1.0.1-a.7 (buildPhase): 00:22:21 Javascript error: chome://browser/content/parent/ext-browser.js, line: TypeError: currentTab.linkedBrowser is null 

Does someone got the same ? The thing is the build seems to be stuck forever in this state

@matthewpi
Copy link
Member Author

Hey I seems to have a build failure :

➜ nix run nixpkgs#nixpkgs-review -- pr --print-result 347222 --no-shell
[...]

[1/0/2 built] building zen-browser-unwrapped-1.0.1-a.7 (buildPhase): 00:22:21 Javascript error: chome://browser/content/parent/ext-browser.js, line: TypeError: currentTab.linkedBrowser is null 

Does someone got the same ? The thing is the build seems to be stuck forever in this state

How powerful is the system you are building this on? It's not uncommon for the output to become "stuck" and not print anything for awhile, especially on lower-end systems.

@Vinetos
Copy link
Member

Vinetos commented Oct 9, 2024

Hey I seems to have a build failure :

➜ nix run nixpkgs#nixpkgs-review -- pr --print-result 347222 --no-shell
[...]

[1/0/2 built] building zen-browser-unwrapped-1.0.1-a.7 (buildPhase): 00:22:21 Javascript error: chome://browser/content/parent/ext-browser.js, line: TypeError: currentTab.linkedBrowser is null 

Does someone got the same ? The thing is the build seems to be stuck forever in this state

How powerful is the system you are building this on? It's not uncommon for the output to become "stuck" and not print anything for awhile, especially on lower-end systems.

Well, I am not really on lower-end gear (Ryzen 9 5900X, 32 Go of RAM) but good news, the build is continuing.
I have waited something like 10 mins (wtf was the build doing) and now its continuing

1 package built:
zen-browser-unwrapped

Result of nixpkgs-review pr 347222 run on x86_64-linux 1

1 package built:
  • zen-browser-unwrapped

@Titaniumtown
Copy link
Contributor

Hey I seems to have a build failure :

➜ nix run nixpkgs#nixpkgs-review -- pr --print-result 347222 --no-shell
[...]

[1/0/2 built] building zen-browser-unwrapped-1.0.1-a.7 (buildPhase): 00:22:21 Javascript error: chome://browser/content/parent/ext-browser.js, line: TypeError: currentTab.linkedBrowser is null 

Does someone got the same ? The thing is the build seems to be stuck forever in this state

That is not a build failure. The build continues and succeeds. I saw the same log message, but it had no effect on the success of the build.

@Titaniumtown
Copy link
Contributor

New release pushed with critical security fixes (from upstream firefox): https://github.com/zen-browser/desktop/releases/tag/1.0.1-a.8

@simon-bueler
Copy link

So, did a complete zen-browser build as of their docs describe here: https://docs.zen-browser.app/building without issue.

@Eveeifyeve
Copy link
Contributor

So, did a complete zen-browser build as of their docs describe here: https://docs.zen-browser.app/building without issue.

Okay it doesn't answer this

@simon-bueler
Copy link

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.

Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

@Eveeifyeve
Copy link
Contributor

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.
Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

@matthewpi matthewpi changed the title zen-browser: init at 1.0.1-a.12 zen-browser: init at 1.0.1-a.13 Oct 27, 2024
@simon-bueler
Copy link

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.
Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

I ran the command in the repo I failed to build zen-browser in, running nix-build -A firefox anywhere else does not work anyway.

@Eveeifyeve
Copy link
Contributor

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.
Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

I ran the command in the repo I failed to build zen-browser in, running nix-build -A firefox anywhere else does not work anyway.

Flake or no flake system config?

@simon-bueler
Copy link

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.
Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

I ran the command in the repo I failed to build zen-browser in, running nix-build -A firefox anywhere else does not work anyway.

Flake or no flake system config?

no flake

@Eveeifyeve
Copy link
Contributor

Eveeifyeve commented Oct 27, 2024

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.

Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

I ran the command in the repo I failed to build zen-browser in, running nix-build -A firefox anywhere else does not work anyway.

Flake or no flake system config?

no flake

Do you have a channel set?
Idk what the issue is but i am using a flake system config and it works fine. Idk what the problem is, does anyone know the issue that is not using a flake based config?

@simon-bueler
Copy link

@Eveeifyeve : It was in response to my previous post:

Tried it on another machine with a Ryzen 7 4800U and 32 GB ram (30.7 available due to iGPU), just to see if lesser cores does change the outcome (24 vs 16 threads). It crashed the system due to no available ram.

Is there a way to limit the parallel build processes somehow and since surfer is still in prerelease/prototype stage, shouldn't the recommended build method be used?

Running nix-build -A firefox just copys it from https://cache.nixos.org

Not if you clone this pr locally.

I ran the command in the repo I failed to build zen-browser in, running nix-build -A firefox anywhere else does not work anyway.

Flake or no flake system config?

no flake

Do you have a channel set? Idk what the issue is but i am using a flake system config and it works fine. Idk what the problem is, does anyone know the issue that is not using a flake based config?

I don't think it is a system problem I have. I build zen-browser using their recommended method and it worked fine. It used surfer as a buildtool, just the outcome was a non-branded zen-browser version. It too used all cores to build but did not end up using too much ram. So there seems to be a difference in the build settings.

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

@arunoruto
Copy link
Contributor

arunoruto commented Oct 27, 2024

It took me around 50 minutes using a server with 2x14 cores (56 threads). I didn't get any obvious errors during building, but I am not unable to try it out (maybe tomorrow).

EDIT While running zed I get the following log output:

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) [GFX1-]: glxtest: libEGL no display
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) |[1][GFX1-]: glxtest: No visuals found (t=23.5602) [GFX1-]: glxtest: No visuals found
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) |[1][GFX1-]: glxtest: No visuals found (t=23.5602) |[2][GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor (t=23.5602) [GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) |[1][GFX1-]: glxtest: No visuals found (t=23.5602) |[2][GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor (t=23.5602) |[3][GFX1-]: PCI candidate 0x10de/0x1b02 (t=23.5602) [GFX1-]: PCI candidate 0x10de/0x1b02
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) |[1][GFX1-]: glxtest: No visuals found (t=23.5602) |[2][GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor (t=23.5602) |[3][GFX1-]: PCI candidate 0x10de/0x1b02 (t=23.5602) |[4][GFX1-]: PCI candidate 0x10de/0x1b02 (t=23.5602) [GFX1-]: PCI candidate 0x10de/0x1b02
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL no display (t=23.5592) |[1][GFX1-]: glxtest: No visuals found (t=23.5602) |[2][GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor (t=23.5602) |[3][GFX1-]: PCI candidate 0x10de/0x1b02 (t=23.5602) |[4][GFX1-]: PCI candidate 0x10de/0x1b02 (t=23.5602) |[5][GFX1-]: PCI candidate 0x1a03/0x2000 (t=23.5602) [GFX1-]: PCI candidate 0x1a03/0x2000

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 347222


x86_64-linux

✅ 2 packages built:
  • zen-browser
  • zen-browser-unwrapped

@arunoruto
Copy link
Contributor

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

I just put some MWE together and it seems to be running, but I haven't tested it much. It is available on my flake repo.

@Titaniumtown
Copy link
Contributor

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

Because binaries are not as auditable, and now you're trusting those builds. Plus you can do more with a package that actually compiles it :p

@ofborg ofborg bot requested a review from Titaniumtown October 28, 2024 02:16
@dezren39
Copy link
Contributor

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

Because binaries are not as auditable, and now you're trusting those builds. Plus you can do more with a package that actually compiles it :p

i wish i could, but i can't get it to work lol. and my 'budget' for packages that take forever to build is tight. (though even once this is binary cached, no guarantees some other part of my system is going to impact my ability to use it)

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

I just put some MWE together and it seems to be running, but I haven't tested it much. It is available on my flake repo.

i tried this
arunoruto.url = "github:arunoruto/flake";
arunoruto.packages.${system}.zen-browser
but having some issue getting it to run

@arunoruto
Copy link
Contributor

i tried this arunoruto.url = "github:arunoruto/flake"; arunoruto.packages.${system}.zen-browser but having some issue getting it to run

You can just run nix build github:arunoruto/flake#zen-browser and then ./result/bin/zen, no need to import the whole flake to your config for testing.

@dezren39
Copy link
Contributor

dezren39 commented Oct 28, 2024

i tried this arunoruto.url = "github:arunoruto/flake"; arunoruto.packages.${system}.zen-browser but having some issue getting it to run

You can just run nix build github:arunoruto/flake#zen-browser and then ./result/bin/zen, no need to import the whole flake to your config for testing.

thank you for reply, i just wanted it running on my local system for use more than testing. :-)

i did try building it just now and i get a similar error

osh-0.23.0$ ./result/bin/zen
Could not start dynamically linked executable: ./result/bin/zen
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

i get same error using the zen one in path from where i added the flake

[user@amd:~/zen]$ zen
Could not start dynamically linked executable: /run/current-system/sw/bin/zen
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

@Th1nkK1D
Copy link

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

Building from source aligns with Nix's reproducibility idea: if it can be built in some environment, then it should work fine in that environment. For Zen, finding an efficient way to build it might take a while. In the meantime, you can use a flatpack version

flatpak install flathub io.github.zen_browser.zen

I tried and it's working fine (the generic version is expected to be slower than building it from the source) just need to enable flatpak on NixOS

@dezren39
Copy link
Contributor

On another topic: why not repackage the binary provided by the github-project of zen browser instead of building the whole thing from scratch?

Building from source aligns with Nix's reproducibility idea: if it can be built in some environment, then it should work fine in that environment. For Zen, finding an efficient way to build it might take a while. In the meantime, you can use a flatpack version

flatpak install flathub io.github.zen_browser.zen

I tried and it's working fine (the generic version is expected to be slower than building it from the source) just need to enable flatpak on NixOS

flatpak does work but presents a few other flatpak-related issues that running natively doesn't present.

@matthewpi matthewpi changed the title zen-browser: init at 1.0.1-a.13 zen-browser: init at 1.0.1-a.16 Oct 31, 2024
I use SSH keys to sign all my commits, but there is no section or
property for listing those for maintainers. To avoid confusion I'm
removing my unused GPG keys.

Signed-off-by: Matthew Penner <me@matthewp.io>
Signed-off-by: Matthew Penner <me@matthewp.io>
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.

Package request: Zen Browser