about summary refs log tree commit diff
path: root/machines/profpatsch/pkgs.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-02-03 08:23:34 +0100
committeraszlig <aszlig@nix.build>2018-02-03 08:34:17 +0100
commitc55085473c1d6e08f8fd950805d52da32386b4f2 (patch)
treee9c9a866c9810ccbb0759135b4c971a964a0d94a /machines/profpatsch/pkgs.nix
parentbb98e01fb5c020ab6679831ce856329b65867b1f (diff)
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 <aszlig@nix.build>
Cc: @Profpatsch
Diffstat (limited to 'machines/profpatsch/pkgs.nix')
-rw-r--r--machines/profpatsch/pkgs.nix5
1 files changed, 5 insertions, 0 deletions
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