2014-09-11 17:05:14 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, zlib, bzip2 }:
|
2014-05-26 10:12:38 +01:00
|
|
|
|
2014-08-24 17:52:34 +01:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-05-26 10:12:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "influxdb-${version}";
|
2015-03-05 19:17:58 +00:00
|
|
|
version = "0.8.3";
|
2014-05-26 10:12:38 +01:00
|
|
|
arch = if stdenv.system == "x86_64-linux" then "amd64" else "386";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://s3.amazonaws.com/influxdb/${name}.${arch}.tar.gz";
|
|
|
|
sha256 = if arch == "amd64" then
|
2015-03-05 19:17:58 +00:00
|
|
|
"e625902d403434c799f9d9ffc2592a3880f82d435423fde7174e5e4fe0f41148" else
|
|
|
|
"5abe9f432553e66c8aff86c4311eba16b874678d04b52bfe9e2019c01059ec78";
|
2014-05-26 10:12:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D influxdb $out/bin/influxdb
|
2014-12-17 18:11:30 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/influxdb
|
2014-05-26 10:12:38 +01:00
|
|
|
wrapProgram "$out/bin/influxdb" \
|
2015-01-15 04:25:26 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64:${zlib}/lib:${bzip2}/lib"
|
2014-05-26 10:12:38 +01:00
|
|
|
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/share/influxdb
|
2014-05-26 10:12:38 +01:00
|
|
|
cp -R admin scripts config.toml $out/share/influxdb
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Scalable datastore for metrics, events, and real-time analytics";
|
|
|
|
homepage = http://influxdb.com/;
|
|
|
|
license = licenses.mit;
|
|
|
|
|
|
|
|
maintainers = [ maintainers.offline ];
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
}
|