nixos/fontconfig/make-fonts-cache: don't fail to clean the cache

Today I couldn't rebuild because of:
[...]
/nix/store/lxkrsrlqplz2n75hvpq6vr0gam0gfgrl-font-cursor-misc-1.0.3/lib/X11/fonts/misc: skipping, existing cache is valid: 1 fonts, 0 dirs
/var/cache/fontconfig: cleaning cache directory
/nix/store/xq3c44ha15pfa5a9mv1z9mni3cfghsna-fc-cache: cleaning cache directory
fc-cache: succeeded
rm: cannot remove '/nix/store/xq3c44ha15pfa5a9mv1z9mni3cfghsna-fc-cache/CACHEDIR.TAG': No such file or directory
builder for '/nix/store/zxfmil40n79vhn5hb4flqc76j99a3l7b-fc-cache.drv' failed with exit code 1
This commit is contained in:
Symphorien Gibol 2018-11-04 21:23:52 +01:00
parent c70ad805d2
commit a6a29e07bc

View File

@ -3,6 +3,7 @@
runCommand "fc-cache" runCommand "fc-cache"
rec { rec {
buildInputs = [ fontconfig.bin ]; buildInputs = [ fontconfig.bin ];
preferLocalBuild = true;
passAsFile = [ "fontDirs" ]; passAsFile = [ "fontDirs" ];
fontDirs = '' fontDirs = ''
<!-- Font directories --> <!-- Font directories -->
@ -27,5 +28,5 @@ runCommand "fc-cache"
# This is not a cache dir in the normal sense -- it won't be automatically # This is not a cache dir in the normal sense -- it won't be automatically
# recreated. # recreated.
rm "$out/CACHEDIR.TAG" rm -f "$out/CACHEDIR.TAG"
'' ''