Utensil's technical posts in Chinese (mostly 2005-2020) utensil.tngl.sh/tech/
0

Configure Feed

Select the types of activity you want to include in your feed.

fix(ci/tangled): set TZDIR so tzinfo gem finds zoneinfo in /nix/store

First Spindle run failed at config.rb:74 (Middleman 'Time.zone =' /
'set :timezone' line) with TZInfo::DataSources::ZoneinfoDirectoryNotFound.
tzinfo's default search path is ['/usr/share/zoneinfo', '/etc/zoneinfo'];
nixery's tzdata package puts zoneinfo under /nix/store/<hash>-tzdata-XXXX/
share/zoneinfo. Locate it via find + export TZDIR before the build step.

+9
+9
.tangled/workflows/render.yml
··· 39 39 40 40 echo "::group::env" 41 41 ruby --version; gem --version; node --version 42 + # nixery has tzdata in the closure but at /nix/store/<hash>-tzdata-XXXX/share/zoneinfo, 43 + # not /usr/share/zoneinfo where tzinfo gem looks by default. Point TZDIR at it. 44 + TZDIR_FOUND="$(find /nix/store -maxdepth 4 -type d -name zoneinfo 2>/dev/null | head -1)" 45 + if [ -n "$TZDIR_FOUND" ]; then 46 + export TZDIR="$TZDIR_FOUND" 47 + echo "TZDIR=$TZDIR" 48 + else 49 + echo "::warning::no zoneinfo dir found in /nix/store — middleman config may fail on Time.zone=" 50 + fi 42 51 echo "::endgroup::" 43 52 44 53 echo "::group::bundle install"