···1616, cupsSupport ? true
1717, pulseSupport ? config.pulseaudio or stdenv.isLinux
1818, commandLineArgs ? ""
1919+, pkgsBuildTarget
2020+, pkgsBuildBuild
2121+, pkgs
1922}:
20232124let
2222- llvmPackages = llvmPackages_16;
2323- stdenv = llvmPackages.stdenv;
2525+ # Sometimes we access `llvmPackages` via `pkgs`, and other times
2626+ # via `pkgsFooBar`, so a string (attrname) is the only way to have
2727+ # a single point of control over the LLVM version used.
2828+ llvmPackages_attrName = "llvmPackages_16";
2929+ stdenv = pkgs.${llvmPackages_attrName}.stdenv;
24302531 upstream-info = (import ./upstream-info.nix).${channel};
2632···4248 callPackage = newScope chromium;
43494450 chromium = rec {
4545- inherit stdenv llvmPackages upstream-info;
5151+ inherit stdenv llvmPackages_attrName upstream-info;
46524753 mkChromiumDerivation = callPackage ./common.nix ({
4854 inherit channel chromiumVersionAtLeast versionRange;
···6066 inherit channel chromiumVersionAtLeast enableWideVine ungoogled;
6167 };
62686363- ungoogled-chromium = callPackage ./ungoogled.nix {};
6969+ # ungoogled-chromium is, contrary to its name, not a build of
7070+ # chromium. It is a patched copy of chromium's *source code*.
7171+ # Therefore, it needs to come from buildPackages, because it
7272+ # contains python scripts which get /nix/store/.../bin/python3
7373+ # patched into their shebangs.
7474+ ungoogled-chromium = pkgsBuildBuild.callPackage ./ungoogled.nix {};
6475 };
65766677 pkgSuffix = if channel == "dev" then "unstable" else
···209220210221 export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
211222223223+ '' + lib.optionalString (!xdg-utils.meta.broken) ''
212224 # Mainly for xdg-open but also other xdg-* tools (this is only a fallback; \$PATH is suffixed so that other implementations can be used):
213225 export PATH="\$PATH\''${PATH:+:}${xdg-utils}/bin"
226226+ '' + ''
214227215228 .
216229 w