diff options
author | Christian Kauhaus <kc@flyingcircus.io> | 2016-08-04 15:25:23 +0200 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2016-08-04 15:25:23 +0200 |
commit | ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0 (patch) | |
tree | c6cbffe9779d90d4ab3f8c3b1d1dd91aa69d968d /pkgs/servers | |
parent | 8f52a0f926cd8c3f8f6e24173b6c66eae5bcb5dc (diff) | |
download | nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar.gz nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar.bz2 nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar.lz nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar.xz nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.tar.zst nixlib-ea7e705cd905e01bc65f2a7ccc6e700bd1bcd4e0.zip |
varnish: fix localstatedir for varnish* tools (#17508)
The varnish tools (varnishstat, varnishlog, ...) tried to load the VSM file from a spurious var directory in the Nix store. Fix the default so the tools "just work" when also keeping services.varnish.stateDir at the default. Notes: - The tools use $localstatedir/$HOSTNAME so I've adapted the default for stateDir as well to contain hostName. - Added postStop action to remove the localstatedir. There is no point in keeping it around when varnish does not run, as it regenerates it on startup anyway. Fixes #7495
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/varnish/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index 358afb3dfb36..fb3331768014 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { buildInputs = [ pcre libxslt groff ncurses pkgconfig readline python pythonPackages.docutils]; + buildFlags = "localstatedir=/var/spool"; + meta = { description = "Web application accelerator also known as a caching HTTP reverse proxy"; homepage = "https://www.varnish-cache.org"; |