From c55085473c1d6e08f8fd950805d52da32386b4f2 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Feb 2018 08:23:34 +0100 Subject: profpatsch/searx: Rebase searx-secret-key.patch Get rid of the annoying build error again (see 8be3704c3fbe08308132d92a6 for the last time), but this time for searx 0.13.1. The main thing that has changed is that instead of hmac.new() there is now a helper function called new_hmac(), which the patch now uses. I've also cleaned up some tiny bits reported by flake8 and fixed the description of SecretAppKeyError to refer to XDG_CACHE_HOME instead of XDG_CACHE_DIR. In addition to the updated patch, we now need to add XDG_CACHE_HOME to a writable directory (in this case $TMPDIR), because otherwise the test_webapp fails with an SecretAppKeyError, as it will try to create leading directories to XDG_CACHE_HOME. Signed-off-by: aszlig Cc: @Profpatsch --- machines/profpatsch/pkgs.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'machines/profpatsch/pkgs.nix') diff --git a/machines/profpatsch/pkgs.nix b/machines/profpatsch/pkgs.nix index 86fa1611..39dd85a3 100644 --- a/machines/profpatsch/pkgs.nix +++ b/machines/profpatsch/pkgs.nix @@ -68,6 +68,11 @@ let ./patches/searx-secret-key.patch ./patches/searx-rm-soundcloud.patch ]; + # xdg.BaseDirectory.save_cache_path() will try to create leading dirs, but + # within the builder we don't have a writable home directory. + preCheck = (old.preCheck or "") + '' + export XDG_CACHE_HOME="$TMPDIR/cache" + ''; }); # A ghci with some sane default packages in scope, & hoogle -- cgit 1.4.1