···3636 inherit (lib.types)
3737 mkOptionType
3838 ;
3939+ prioritySuggestion = ''
4040+ Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
4141+ '';
3942in
4043rec {
4144···184187 if length defs == 1
185188 then (head defs).value
186189 else assert length defs > 1;
187187- throw "The option `${showOption loc}' is defined multiple times.\n${message}\nDefinition values:${showDefs defs}";
190190+ throw "The option `${showOption loc}' is defined multiple times while it's expected to be unique.\n${message}\nDefinition values:${showDefs defs}\n${prioritySuggestion}";
188191189192 /* "Merge" option definitions by checking that they all have the same value. */
190193 mergeEqualOption = loc: defs:
···195198 else if length defs == 1 then (head defs).value
196199 else (foldl' (first: def:
197200 if def.value != first.value then
198198- throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}"
201201+ throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}\n${prioritySuggestion}"
199202 else
200203 first) (head defs) (tail defs)).value;
201204
···150150 libdrm wayland mesa.drivers libxkbcommon
151151 curl
152152 libepoxy
153153+ libffi
153154 ] ++ lib.optional systemdSupport systemd
154155 ++ lib.optionals cupsSupport [ libgcrypt cups ]
155155- ++ lib.optional pulseSupport libpulseaudio
156156- ++ lib.optional (chromiumVersionAtLeast "110") libffi;
156156+ ++ lib.optional pulseSupport libpulseaudio;
157157158158 patches = [
159159 # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed):
···293293 chrome_pgo_phase = 0;
294294 clang_base_path = "${llvmPackages.clang}";
295295 use_qt = false;
296296- } // lib.optionalAttrs (!chromiumVersionAtLeast "110") {
297297- # The default has changed to false. We'll build with libwayland from
298298- # Nixpkgs for now but might want to eventually use the bundled libwayland
299299- # as well to avoid incompatibilities (if this continues to be a problem
300300- # from time to time):
301301- use_system_libwayland = true;
302302- # The default value is hardcoded instead of using pkg-config:
303303- system_wayland_scanner_path = "${wayland.bin}/bin/wayland-scanner";
304304- } // lib.optionalAttrs (chromiumVersionAtLeast "110") {
305296 # To fix the build as we don't provide libffi_pic.a
306297 # (ld.lld: error: unable to find library -l:libffi_pic.a):
307298 use_system_libffi = true;