···236236 + libStr.concatMapStringsSep introSpace (go (indent + " ")) v
237237 + outroSpace + "]"
238238 else if isFunction v then
239239- let fna = lib.functionArgs v;
239239+ # functionArgs throws in case of (partially applied) builtins
240240+ # on nix before commit b2748c6e99239ff6803ba0da76c362790c8be192
241241+ # which includes current nix stable
242242+ # TODO remove tryEval workaround when the issue is resolved on nix stable
243243+ let fna = builtins.tryEval (lib.functionArgs v);
240244 showFnas = concatStringsSep ", " (libAttr.mapAttrsToList
241245 (name: hasDefVal: if hasDefVal then name + "?" else name)
242242- fna);
243243- in if fna == {} then "<function>"
244244- else "<function, args: {${showFnas}}>"
246246+ fna.value);
247247+ in if !fna.success || fna.value == {}
248248+ then "<function>"
249249+ else "<function, args: {${showFnas}}>"
245250 else if isAttrs v then
246251 # apply pretty values if allowed
247252 if attrNames v == [ "__pretty" "val" ] && allowPrettyValues
+2-1
lib/types.nix
···454454 };
455455456456 functionTo = elemType: mkOptionType {
457457- name = "function that evaluates to a(n) ${elemType.name}";
457457+ name = "functionTo";
458458+ description = "function that evaluates to a(n) ${elemType.name}";
458459 check = isFunction;
459460 merge = loc: defs:
460461 fnArgs: (mergeDefinitions (loc ++ [ "[function body]" ]) elemType (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs)).mergedValue;
···153153 ./patches/no-build-timestamps.patch # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed)
154154 ./patches/widevine-79.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags
155155 # ++ optional (versionRange "68" "72") (githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000")
156156- ] ++ optional (versionRange "89" "90") (githubPatch
157157- # To fix the build of chromiumBeta:
156156+ ] ++ optional (versionRange "89" "90.0.4402.0") (githubPatch
157157+ # To fix the build of chromiumBeta and chromiumDev:
158158 "b5b80df7dafba8cafa4c6c0ba2153dfda467dfc9" # add dependency on opus in webcodecs
159159 "1r4wmwaxz5xbffmj5wspv2xj8s32j9p6jnwimjmalqg3al2ba64x"
160160 );
···279279 # Disable PGO (defaults to 2 since M89) because it fails without additional changes:
280280 # error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version
281281 chrome_pgo_phase = 0;
282282+ } // optionalAttrs (chromiumVersionAtLeast "90") {
283283+ # Disable build with TFLite library because it fails without additional changes:
284284+ # ninja: error: '../../chrome/test/data/simple_test.tflite', needed by 'test_data/simple_test.tflite', missing and no known rule to make it
285285+ # Note: chrome/test/data/simple_test.tflite is in the Git repository but not in chromium-90.0.4400.8.tar.xz
286286+ # See also chrome/services/machine_learning/README.md
287287+ build_with_tflite_lib = false;
282288 } // optionalAttrs ungoogled {
283289 chrome_pgo_phase = 0;
284290 enable_hangout_services_extension = false;
···11+# shellcheck shell=bash
22+33+fixupOutputHooks+=(_gtk4CleanComments)
44+55+# Clean comments that link to generator of the file
66+_gtk4CleanComments() {
77+ local f="${prefix:?}/lib/gtk-4.0/4.0.0/immodules.cache"
88+ if [ -f "$f" ]; then
99+ sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
1010+ fi
1111+}