From 751a2943f49bdbc9a231ccf2d748c171ed3d6389 Mon Sep 17 00:00:00 2001 From: Oliver Charles Date: Thu, 20 Nov 2014 12:23:37 +0000 Subject: [PATCH] opentsdb: Upgrade to 2.1.0-RC1 --- nixos/modules/services/databases/opentsdb.nix | 7 ++++++- pkgs/tools/misc/opentsdb/default.nix | 17 +++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix index 93980dc7b124..dce2d1936418 100644 --- a/nixos/modules/services/databases/opentsdb.nix +++ b/nixos/modules/services/databases/opentsdb.nix @@ -5,6 +5,10 @@ with lib; let cfg = config.services.opentsdb; + configFile = pkgs.writeText "opentsdb.conf" '' + tsd.core.auto_create_metrics = true + ''; + in { ###### interface @@ -68,12 +72,13 @@ in { requires = [ "hbase.service" ]; environment.JAVA_HOME = "${pkgs.jre}"; + path = [ pkgs.gnuplot ]; serviceConfig = { PermissionsStartOnly = true; User = cfg.user; Group = cfg.group; - ExecStart = "${cfg.package}/bin/tsdb tsd --staticroot=${cfg.package}/share/opentsdb/static --cachedir=/tmp/opentsdb --port=${toString cfg.port}"; + ExecStart = "${cfg.package}/bin/tsdb tsd --staticroot=${cfg.package}/share/opentsdb/static --cachedir=/tmp/opentsdb --port=${toString cfg.port} --config=${configFile}"; }; }; diff --git a/pkgs/tools/misc/opentsdb/default.nix b/pkgs/tools/misc/opentsdb/default.nix index b1d022330462..2e388f2186f6 100644 --- a/pkgs/tools/misc/opentsdb/default.nix +++ b/pkgs/tools/misc/opentsdb/default.nix @@ -1,16 +1,21 @@ -{ stdenv, fetchurl, curl, jdk, jre, makeWrapper, nettools, python }: +{ stdenv, autoconf, automake, fetchurl, curl, jdk, jre, makeWrapper, nettools, python }: with stdenv.lib; stdenv.mkDerivation rec { - name = "opentsdb-2.0.1"; + name = "opentsdb-2.1.0-rc1"; src = fetchurl { - url = https://github.com/OpenTSDB/opentsdb/releases/download/v2.0.1/opentsdb-2.0.1.tar.gz; - sha256 = "1q2gkl72yjzd8yrggl0018m9s8mc9zwnz3d8ias54vqh3irypc2c"; + url = https://github.com/OpenTSDB/opentsdb/archive/v2.1.0RC1.tar.gz; + sha256 = "01li02j8kjanmas2gxkcz3gsn54nyfyvqdylxz3fqqjgg6y7hrm7"; }; - buildPhase = "find ."; + buildInputs = [ autoconf automake curl jdk makeWrapper nettools python ]; - buildInputs = [ curl jdk makeWrapper nettools python ]; + configurePhase = '' + ./bootstrap + mkdir build + cd build + ../configure --prefix=$out + ''; installPhase = '' make install