···362 if match "[a-zA-Z_][a-zA-Z0-9_'-]*" s != null
363 then s else escapeNixString s;
3640000000000000365 # Obsolete - use replaceStrings instead.
366 replaceChars = builtins.replaceStrings or (
367 del: new: s:
···362 if match "[a-zA-Z_][a-zA-Z0-9_'-]*" s != null
363 then s else escapeNixString s;
364365+ /* Escapes a string such that it is safe to include verbatim in an XML
366+ document.
367+368+ Type: string -> string
369+370+ Example:
371+ escapeXML ''"test" 'test' < & >''
372+ => "\\[\\^a-z]\\*"
373+ */
374+ escapeXML = builtins.replaceStrings
375+ ["\"" "'" "<" ">" "&"]
376+ [""" "'" "<" ">" "&"];
377+378 # Obsolete - use replaceStrings instead.
379 replaceChars = builtins.replaceStrings or (
380 del: new: s:
···1+{ runCommand, vega-lite }:
2+3+let
4+ inherit (vega-lite) packageName version;
5+in
6+7+runCommand "${packageName}-tests" { meta.timeout = 60; }
8+ ''
9+ # get version of installed program and compare with package version
10+ claimed_version="$(${vega-lite}/bin/vl2vg --version)"
11+ if [[ "$claimed_version" != "${version}" ]]; then
12+ echo "Error: program version does not match package version ($claimed_version != ${version})"
13+ exit 1
14+ fi
15+16+ # run dummy commands
17+ ${vega-lite}/bin/vl2vg --help > /dev/null
18+ ${vega-lite}/bin/vl2svg --help > /dev/null
19+ ${vega-lite}/bin/vl2png --help > /dev/null
20+ ${vega-lite}/bin/vl2pdf --help > /dev/null
21+22+ # needed for Nix to register the command as successful
23+ touch $out
24+ ''
···17 * parameter given to the kernel. So reserving memory from low to high
18- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
19- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
20-+ * satisfies this constraint again. Reserving 1M at 0x02e00000-0x02f00000 for
21-+ * the DTB leaves rest of the free RAM to the initrd starting at 0x02f00000.
22 * Even with the smallest possible CPU-GPU memory split of the CPU getting
23- * only 64M, the remaining 25M starting at 0x02700000 should allow quite
24- * large initrds before they start colliding with U-Boot.
25-+ * only 64M, the remaining 17M starting at 0x02f00000 should allow reasonably
26+ * sized initrds before they start colliding with U-Boot.
27 */
28 #define ENV_MEM_LAYOUT_SETTINGS \
···33- "pxefile_addr_r=0x02500000\0" \
34- "fdt_addr_r=0x02600000\0" \
35- "ramdisk_addr_r=0x02700000\0"
36-+ "scriptaddr=0x02c00000\0" \
37-+ "pxefile_addr_r=0x02d00000\0" \
38-+ "fdt_addr_r=0x02e00000\0" \
39-+ "ramdisk_addr_r=0x02f00000\0"
4041 #if CONFIG_IS_ENABLED(CMD_MMC)
42 #define BOOT_TARGET_MMC(func) \
···17 * parameter given to the kernel. So reserving memory from low to high
18- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
19- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
20++ * satisfies this constraint again. Reserving 1M at 0x03700000-0x03800000 for
21++ * the DTB leaves rest of the free RAM to the initrd starting at 0x03800000.
22 * Even with the smallest possible CPU-GPU memory split of the CPU getting
23- * only 64M, the remaining 25M starting at 0x02700000 should allow quite
24- * large initrds before they start colliding with U-Boot.
25++ * only 64M, the remaining 9M starting at 0x03800000 should allow reasonably
26+ * sized initrds before they start colliding with U-Boot.
27 */
28 #define ENV_MEM_LAYOUT_SETTINGS \
···33- "pxefile_addr_r=0x02500000\0" \
34- "fdt_addr_r=0x02600000\0" \
35- "ramdisk_addr_r=0x02700000\0"
36++ "scriptaddr=0x03500000\0" \
37++ "pxefile_addr_r=0x03600000\0" \
38++ "fdt_addr_r=0x03700000\0" \
39++ "ramdisk_addr_r=0x03800000\0"
4041 #if CONFIG_IS_ENABLED(CMD_MMC)
42 #define BOOT_TARGET_MMC(func) \