2014-09-11 18:05:14 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper, zlib, bzip2 }:
|
2014-05-26 11:12:38 +02:00
|
|
|
|
2014-08-24 18:52:34 +02:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-05-26 11:12:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "influxdb-${version}";
|
2014-09-11 18:05:14 +02:00
|
|
|
version = "0.8.2";
|
2014-05-26 11:12:38 +02: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
|
2014-09-11 18:05:14 +02:00
|
|
|
"0m27agjf9v76w5xms8w3z91k4hxw832nxqr030qzqxynwbxj0vg6" else
|
|
|
|
"0bdjpdq4yhfsmvl756xhkd1d8565d19g66l5rlymksc71ps8kbj6";
|
2014-05-26 11:12:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D influxdb $out/bin/influxdb
|
2014-12-17 19:11:30 +01:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/influxdb
|
2014-05-26 11:12:38 +02:00
|
|
|
wrapProgram "$out/bin/influxdb" \
|
2014-12-17 19:11:30 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.cc.gcc}/lib:${stdenv.cc.gcc}/lib64:${zlib}/lib:${bzip2}/lib"
|
2014-05-26 11:12:38 +02:00
|
|
|
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/share/influxdb
|
2014-05-26 11:12:38 +02: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"];
|
|
|
|
};
|
|
|
|
}
|