-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Package request: Zen Browser #327982
Package request: Zen Browser #327982
Comments
I've tried to write a package for it based on the package for the floorp browser, but it's not working for some reason. I get this error:
This is my first time packaging something so I don't really know how to fix it |
|
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
This is what I got thus far ...
00:00:06 checking cargo version... 1.77.1
00:00:06 checking for rust host triplet... x86_64-unknown-linux-gnu
00:00:06 checking for rust target triplet... x86_64-unknown-linux-gnu
00:00:06 checking for rustdoc... /nix/store/p8nr5crc52shb4n5b1z266z0g674239g-rustc-wrapper-1.77.2/bin/rustdoc
00:00:06 checking for cbindgen... /nix/store/07i7asifw6pp4a4fgmmxgq8a7r78bfyh-rust-cbindgen-0.26.0/bin/cbindgen
00:00:06 checking for rustfmt... not found
00:00:06 checking for clang for bindgen... /nix/store/v78293y2wi2kyxb93hp30k0ra9r77amf-clang-wrapper-17.0.6/bin/clang++
00:00:06 checking for libclang for bindgen... not found
00:00:06 ERROR: Could not find libclang to generate rust bindings for C/C++. Please install the necessary packages, run `mach bootstrap`, or use --with-libclang-path to give the path containing it.
00:00:06 W Exception when writing resource usage file: [Errno 2] No such file or directory: '/home/me/code/desktop/engine/obj-x86_64-pc-linux-gnu/.mozbuild/profile_build_resources.json'
00:00:07 Config object not found by mach.
00:00:07 *** Fix above errors and then restart with "./mach build" let
pkgs = import <nixpkgs> { };
# I don't know if it needs gcc
in pkgs.mkShell {
nativeBuildInputs = with pkgs; [
# TODO: Install from cargo? Or use this instead?
rust-cbindgen
# TODO: Install from cargo? Or use this instead?
rust-bindgen
alsa-lib
cargo
clang
gcc
libpulseaudio
libclang
llvm
pkg-config
python3
rustc
];
} Maybe someone with experience building with Firefox could help it out on this one |
Isn't there a firefox builder? Just looking at the Floorp expression they didn't use mkshell |
Building this doesn't seem to be the same as building other firefox forks, since it uses surfer to automate building. |
Meanwhile to avoid the flatpak I have this flake that uses the binary release while a proper build works: https://github.com/MarceColl/zen-browser-flake |
This comment was marked as spam.
This comment was marked as spam.
Is there anyway you could make it for the generic version too? |
I spent some time tinkering with this only to later realize Firefox itself doesn't build on {
lib,
stdenv,
fetchFromGitHub,
buildNpmPackage,
vips,
pkg-config,
fetchurl,
gnutar,
git,
}: let
firefoxVersion = "129.0.2";
firefoxSrc = fetchurl {
url = "mirror://mozilla/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.xz";
hash = "sha512-9oBah+XLTkN1g5FuPsGzEtxz7sX8Bs56A4sTvXxoJ7GM84PDBkXZZiPOQWdTUfMCPsa5+J1nbxyImZTq558sEw==";
};
in
buildNpmPackage rec {
pname = "zen-browser";
version = "1.0.0-a.26";
src = fetchFromGitHub {
owner = "zen-browser";
repo = "desktop";
rev = version;
hash = "sha256-SFLleJXchumnA28eYjSkMlFMqngoH8bp02q2WkGlYas=";
fetchSubmodules = true;
};
nativeBuildInputs = [git pkg-config];
buildInputs = [vips gnutar];
patches = [./changes.patch];
preBuild = ''
patch node_modules/@zen-browser/surfer/dist/utils/version.js < ${./dist_utils_version.js.patch}
patch node_modules/@zen-browser/surfer/dist/commands/download/firefox.js < ${./dist_commands_download_firefox.js.patch}
# put the firefox source in the right place (.surfer/engine)
mkdir -p .surfer/engine
cp -r ${firefoxSrc} .surfer/engine/firefox-${firefoxVersion}.source.tar.xz
npm run init
'';
makeCacheWritable = true;
npmDepsHash = "sha256-AxGh/MC8Kw2SHw4wYOTyZjmC1q+hemPxSJZkjWNrYbo=";
meta = with lib; {
description = "Experience tranquillity while browsing the web without people tracking you";
homepage = "https://github.com/zen-browser/desktop";
license = licenses.mpl20;
maintainers = with maintainers; [];
mainProgram = "zen-browser";
platforms = platforms.all;
};
} The main issue with this package is that it depends on I think there are two approaches we can take here to build this from source.
|
@chaezwav I've pushed an update that adds the generic version, you can find more information in the README. Let me know if it works for you and if not feel free to open an issue in the repo. |
@MarceColl It built properly and works fine. Thank you! |
@dit7ya I'm trying to pickup where you left off, what are the patches that you have in your derivation? |
I will look into trying to make this work, but I won't maintain it. |
@Eveeifyeve I would. I'm also working on this. My biggest problem is getting it to work with the firefox wrapper for extensions etc. |
I pretty much know nixpkgs so this shouldn't be hard. |
@Eveeifyeve I would be willing to maintain it too. How are you trying to go about this? Are you trying to use |
Trying to use |
I will work on this tmr as it's 1am for me. |
@Eveeifyeve Do you have your work on some public repo? I can pick this up when I have some time later today. |
This comment was marked as spam.
This comment was marked as spam.
I can publish some changes to a repo today so you can pickup from. |
Hey I don't think it's possible to do Also it doesn't include files needed to be a So summary I am trying to get a working on a version that hopefully should work both Darwin & Linux over here. also @dit7ya can you please provide the patch files? Useful Links:Surfer CLI Github:
Surfer CLI Source Code (NPM): https://www.npmjs.com/package/@zen-browser/surfer?activeTab=code
|
I mean you could do an mkdirevation and use pnpm which is what the project maintainers use. |
@BlueFox1616 , Could you please update the issue content:
|
i just edited it |
not sure if it's better to ask here or the PR, but will native messaging hosts like firefoxpwa be supported by this ? |
Following up on this, does this mean that we need to create a |
@mahyarmirrashed It just means we need to package the We have actually completed packaging everything over in #347222 and it's just waiting to be merged. |
Reopening this, but please see #347222 (comment). Do not open a PR packaging this without addressing all of these concerns. |
Another point I would add is, surfer is very hard to work with, with each update, it may even become a hassle for maintainers. Then there's a concern of using git in the derivation. If in future after packaging this on Nixpkgs, this becomes unmaintainable, we might just have to remove it again. |
Please mention this in pr #347222 |
It was already mentioned (at least, the Git part). |
Can we mention the difficulties of integrating surfer with the Zen maintainers? |
Maybe? |
Hi everyone! I've been following this issue and really excited about getting Zen Browser into nixpkgs. I was wondering if there's any rough timeline or next steps planned? I noticed the previous PR (#347222) had some challenges around Surfer integration and Git dependencies. Is there anyone currently working on a new PR that addresses these, or would it be helpful to open a fresh PR to keep momentum going? |
I think we can't do anything until Zen has a new release that isn't based on an old Firefox with known security issues. |
Currently, Firefox Stable is at version 133. Zen did update to version 133, but it caused several issues with the browser due to some untested changes, so it was rolled back. Zen is moving to a beta release soon, which will be based on the latest Firefox version. |
zen beta has been released |
Maybe also take a look at this flake from @fufexan? |
this flake is more up-to-date (probably mostly the same for packaging though) |
I have a fork from @MarceColl also for my usage of zen browser meanwhile the pkgs is approve. the thing with this flakes is that it didnt build from source it just packages the image zen browser provides which didnt align with nixpkgs idea where pkgs should be built from source whenever it is possible Also, I recommend using flakes like https://github.com/0xc000022070/zen-browser-flake for zen browser because of the auto update (we have github actions that update the flake versions without the need of manual work). Zen browser is highly unstable yet and depending on nixpkgs update cycle to get the newer versions or rollbacks may be counter productive, specially if you're in a stable channel. I rather having my zen outside the radar of nixpkgs through flakes so that i can update and revert it individually without messing my pkgs channel at least until zen become stable |
I would expect that all the version bumps would be backported as per the backport criterion for packages that need to be up to date to work properly. |
With the recent (1.0.2-b.4) change of dropping the specific variant, I've also added aarch64 support to my flake. If anyone wants to test it out and give feedback I would appreciate it. |
Well I just dropped support for 1.0.2-b.4. Please let me know if it works in this pr, as I don't have an |
I don't have an aarch64 machine either. I mentioned this as I haven't seen other flakes which support it. |
We're also supporting the latest browser version in this flake 0xc000022070/zen-browser-flake. |
Zen
zen-browser
Project description
User-friendly, useful, mods that increase usability can be added from the zen-mods mod store, a customizable browser, features that can be searched for in a browser for the end user, easy to use thanks to the shortcut key assignment feature, theme-store, frequently used progressive web apps, add-on apps, websites can be easily accessed thanks to the sidebar feature, can be viewed as a mobile page. container, work spaces, zen-mods, window management by creating multiple tab sections in a window, sidebar feature.
Metadata
The text was updated successfully, but these errors were encountered: