summary refs log tree commit diff
path: root/pkgs/tools/system/collectd
diff options
context:
space:
mode:
authorVolth <volth@webmaster.ms>2017-06-30 20:10:08 +0000
committerVolth <volth@webmaster.ms>2017-06-30 23:26:23 +0000
commit2f1c67746c9239320e0bb55882c5d1ef2535392c (patch)
tree305645cd21fd123a6d45bd07e4b8671a66e7e377 /pkgs/tools/system/collectd
parente02064093218e71da56f73392250cfa85e2babd1 (diff)
downloadnixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar.gz
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar.bz2
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar.lz
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar.xz
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.tar.zst
nixpkgs-2f1c67746c9239320e0bb55882c5d1ef2535392c.zip
collectd: fix configureFlags and place jars to $out/share/java
Diffstat (limited to 'pkgs/tools/system/collectd')
-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;