diff options
author | Jon Seager <jon@sgrs.uk> | 2024-05-03 14:04:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 14:04:34 +0100 |
commit | 2d37b0bd2b6d7367a49fce515ab91b481791e953 (patch) | |
tree | 93069742578e0eab6e0fe0499ca01c42dfa5739a /pkgs/applications/networking/browsers | |
parent | 41bef83a11c08dd71b36e35b459586d6ee0ba86e (diff) | |
parent | 1f88e2fa146c93330846958f95905e3a0d4d9cd3 (diff) |
Merge pull request #308383 from emilylange/split-chromium-google-chrome
google-chrome: move independently of `chromium`, add jnsgruk as maintainer, remove leftover `google-chrome-{beta,dev}` code paths
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r-- | pkgs/applications/networking/browsers/google-chrome/default.nix | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix index 17b7e288f0a63..8abb0f8f3ae82 100644 --- a/pkgs/applications/networking/browsers/google-chrome/default.nix +++ b/pkgs/applications/networking/browsers/google-chrome/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, patchelf, makeWrapper +{ lib, stdenv, patchelf, makeWrapper, fetchurl # Linked dynamic libraries. , glib, fontconfig, freetype, pango, cairo, libX11, libXi, atk, nss, nspr @@ -28,15 +28,9 @@ ## Gentoo , bzip2, libcap -# Which distribution channel to use. -, channel ? "stable" - # Necessary for USB audio devices. , pulseSupport ? true, libpulseaudio -# Only needed for getting information about upstream binaries -, chromium - , gsettings-desktop-schemas , gnome @@ -52,8 +46,6 @@ let withCustomModes = true; }; - version = chromium.upstream-info.version; - deps = [ glib fontconfig freetype pango cairo libX11 libXi atk nss nspr libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite libxcb @@ -70,18 +62,14 @@ let ++ lib.optional libvaSupport libva ++ [ gtk3 gtk4 ]; - suffix = lib.optionalString (channel != "stable") "-${channel}"; - - crashpadHandlerBinary = if lib.versionAtLeast version "94" - then "chrome_crashpad_handler" - else "crashpad_handler"; +in stdenv.mkDerivation (finalAttrs: { + pname = "google-chrome"; + version = "124.0.6367.118"; -in stdenv.mkDerivation { - inherit version; - - name = "google-chrome${suffix}-${version}"; - - src = chromium.chromeSrc; + src = fetchurl { + url = "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${finalAttrs.version}-1_amd64.deb"; + hash = "sha256-H3bv6WiVBl4j38ROZ80+SD9UO9ok+xxcKFxDd9yjWNY="; + }; nativeBuildInputs = [ patchelf makeWrapper ]; buildInputs = [ @@ -103,11 +91,8 @@ in stdenv.mkDerivation { installPhase = '' runHook preInstall - case ${channel} in - beta) appname=chrome-beta dist=beta ;; - dev) appname=chrome-unstable dist=unstable ;; - *) appname=chrome dist=stable ;; - esac + appname=chrome + dist=stable exe=$out/bin/google-chrome-$dist @@ -149,7 +134,7 @@ in stdenv.mkDerivation { --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ --add-flags ${lib.escapeShellArg commandLineArgs} - for elf in $out/share/google/$appname/{chrome,chrome-sandbox,${crashpadHandlerBinary}}; do + for elf in $out/share/google/$appname/{chrome,chrome-sandbox,chrome_crashpad_handler}; do patchelf --set-rpath $rpath $elf patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $elf done @@ -162,13 +147,8 @@ in stdenv.mkDerivation { homepage = "https://www.google.com/chrome/browser/"; license = licenses.unfree; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ primeos ]; - # Note from primeos: By updating Chromium I also update Google Chrome and - # will try to merge PRs and respond to issues but I'm not actually using - # Google Chrome. + maintainers = with maintainers; [ jnsgruk ]; platforms = [ "x86_64-linux" ]; - mainProgram = - if (channel == "dev") then "google-chrome-unstable" - else "google-chrome-${channel}"; + mainProgram = "google-chrome-stable"; }; -} +}) |