NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.97k forks source link

Thorium Browser #184823

Open ghost opened 1 year ago

ghost commented 1 year ago

Project description Chromium fork with performance & privacy benefits.

Metadata

ProminentRetail commented 8 months ago

I wanted to try Thorium out of curiosity and built this:

package.nix ```nix { lib , stdenv , fetchurl , autoPatchelfHook , dpkg , wrapGAppsHook , alsa-lib , at-spi2-atk , at-spi2-core , cairo , cups , curl , dbus , expat , ffmpeg , fontconfig , freetype , glib , glibc , gtk3 , gtk4 , libcanberra , liberation_ttf , libexif , libglvnd , libkrb5 , libnotify , libpulseaudio , libu2f-host , libva , libxkbcommon , mesa , nspr , nss , pango , pciutils , pipewire , qt6 , speechd , udev , unrar , vaapiVdpau , vulkan-loader , wayland , wget , xdg-utils , xfce , xorg }: stdenv.mkDerivation rec { pname = "thorium-browser"; version = "117.0.5938.157"; src = fetchurl { url = "https://github.com/Alex313031/thorium/releases/download/M${version}/thorium-browser_${version}_amd64.deb"; hash = "sha256-muNBYP6832PmP0et9ESaRpd/BIwYZmwdkHhsMNBLQE4="; }; nativeBuildInputs = [ autoPatchelfHook dpkg wrapGAppsHook qt6.wrapQtAppsHook ]; buildInputs = [ stdenv.cc.cc.lib alsa-lib at-spi2-atk at-spi2-core cairo cups curl dbus expat ffmpeg fontconfig freetype glib glibc gtk3 gtk4 libcanberra liberation_ttf libexif libglvnd libkrb5 libnotify libpulseaudio libu2f-host libva libxkbcommon mesa nspr nss qt6.qtbase pango pciutils pipewire speechd udev unrar vaapiVdpau vulkan-loader wayland wget xdg-utils xfce.exo xorg.libxcb xorg.libX11 xorg.libXcursor xorg.libXcomposite xorg.libXdamage xorg.libXext xorg.libXfixes xorg.libXi xorg.libXrandr xorg.libXrender xorg.libXtst xorg.libXxf86vm ]; autoPatchelfIgnoreMissingDeps = [ "libQt5Widgets.so.5" "libQt5Gui.so.5" "libQt5Core.so.5" ]; installPhase = '' runHook preInstall mkdir -p $out cp -r usr/* $out cp -r etc $out cp -r opt $out ln -sf $out/opt/chromium.org/thorium/thorium-browser $out/bin/thorium-browser rm $out/share/applications/thorium-shell.desktop substituteInPlace $out/share/applications/thorium-browser.desktop \ --replace /usr/bin $out/bin \ --replace StartupWMClass=thorium StartupWMClass=thorium-browser \ --replace Icon=thorium-browser Icon=$out/opt/chromium.org/thorium/product_logo_256.png addAutoPatchelfSearchPath $out/chromium.org/thorium addAutoPatchelfSearchPath $out/chromium.org/thorium/lib substituteInPlace $out/opt/chromium.org/thorium/thorium-browser \ --replace 'export LD_LIBRARY_PATH' "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ lib.makeLibraryPath buildInputs }:$out/chromium.org/thorium:$out/chromium.org/thorium/lib" \ --replace /usr $out runHook postInstall ''; meta = with lib; { description = "Compiler-optimized private Chromium fork"; homepage = "https://thorium.rocks/index.html"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; platforms = [ "x86_64-linux" ]; mainProgram = "thorium-browser"; }; } ```

But I decided I wasn't going to use it, so I'll leave this here in case it's helpful to anyone. It seems to work just fine, but I haven't tested it very much.

ShalokShalom commented 8 months ago

What is with this?

https://github.com/almahdi/nix-thorium

blurskye commented 5 months ago

that is not it, we need thorium in nixos, i suppose this is browser of choice for many users specially, it is not filled with unnecessary bullshitery like brave and has chome store support and widevine cdm (unlike ungoogled chromium)

aeronth commented 5 months ago

Would definitely also like to give the thorium browser a whirl, as there is currently no easy way to use Google Chrome Sync for ARM based Linux.

rgri commented 5 months ago

PR #284085

rastarr commented 3 weeks ago

any update on this PR? popular browser. seems to have stalled

bornav commented 1 week ago

@rastarr I have been using @christoph00 definition for a few months without any issue https://github.com/christoph00/nixcfg/blob/53a04867e4e080b98a0f6788cc2c73dd58f4a0a5/packages/thorium/default.nix but since he has archived it and the version is out of date here is the same but latest