From a6a29e07bcd8e9c8e951e6172bc63075738eba46 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol <symphorien+git@xlumurb.eu> Date: Sun, 4 Nov 2018 21:23:52 +0100 Subject: [PATCH] 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 --- pkgs/development/libraries/fontconfig/make-fonts-cache.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/fontconfig/make-fonts-cache.nix b/pkgs/development/libraries/fontconfig/make-fonts-cache.nix index 76e89b97617e..1c88235b9257 100644 --- a/pkgs/development/libraries/fontconfig/make-fonts-cache.nix +++ b/pkgs/development/libraries/fontconfig/make-fonts-cache.nix @@ -3,6 +3,7 @@ runCommand "fc-cache" rec { buildInputs = [ fontconfig.bin ]; + preferLocalBuild = true; passAsFile = [ "fontDirs" ]; fontDirs = '' <!-- Font directories --> @@ -27,5 +28,5 @@ runCommand "fc-cache" # This is not a cache dir in the normal sense -- it won't be automatically # recreated. - rm "$out/CACHEDIR.TAG" + rm -f "$out/CACHEDIR.TAG" ''