summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-07-01 19:01:13 +0100
committerGitHub <noreply@github.com>2017-07-01 19:01:13 +0100
commitb1ae3131114d470a18884b45e753b866f0a079ec (patch)
tree47863eb5a1a0b3304ddc1e1071bc4c845d606d2b /pkgs/tools/system
parent712d26d437597ed199ef591f3712106f11e846a9 (diff)
parent2f1c67746c9239320e0bb55882c5d1ef2535392c (diff)
downloadnixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar.gz
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar.bz2
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar.lz
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar.xz
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.tar.zst
nixpkgs-b1ae3131114d470a18884b45e753b866f0a079ec.zip
Merge pull request #26998 from volth/collectd-configure-flags
collectd: fix configureFlags and jar location
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/collectd/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/tools/system/collectd/default.nix b/pkgs/tools/system/collectd/default.nix
index 4aa5aee4c27..824eb74b72e 100644
--- a/pkgs/tools/system/collectd/default.nix
+++ b/pkgs/tools/system/collectd/default.nix
@@ -52,9 +52,21 @@ stdenv.mkDerivation rec {
 
   # for some reason libsigrok isn't auto-detected
   configureFlags =
+    [ "--localstatedir=/var" ] ++
     stdenv.lib.optional (libsigrok != null) "--with-libsigrok" ++
     stdenv.lib.optional (python != null) "--with-python=${python}/bin/python";
 
+  # do not create directories in /var during installPhase
+  postConfigure = ''
+     substituteInPlace Makefile --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/' '#'
+  '';
+
+  postInstall = ''
+    if [ -d $out/share/collectd/java ]; then
+      mv $out/share/collectd/java $out/share/
+    fi
+  '';
+
   meta = with stdenv.lib; {
     description = "Daemon which collects system performance statistics periodically";
     homepage = https://collectd.org;