Merge pull request #6031 from offlinehacker/pkgs/influxdb-backup/add

Add influxdb-backup
This commit is contained in:
Domen Kožar 2015-01-28 22:41:21 +01:00
commit 2d51fe4005
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,31 @@
{ stdenv, lib, go, fetchgit }:
stdenv.mkDerivation rec {
version = "4556edb";
name = "influxdb-backup-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchgit;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o influxdb-dump github.com/eckardt/influxdb-backup/influxdb-dump
go build -v -o influxdb-restore github.com/eckardt/influxdb-backup/influxdb-restore
'';
installPhase = ''
mkdir -p $out/bin
mv influxdb-dump $out/bin
mv influxdb-restore $out/bin
'';
meta = with stdenv.lib; {
description = "Backup and Restore for InfluxDB";
homepage = https://github.com/eckardt/influxdb-backup;
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,35 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchgit }:
let
goDeps = [
{
root = "github.com/eckardt/influxdb-backup";
src = fetchgit {
url = https://github.com/eckardt/influxdb-backup.git;
rev = "4556edbffa914a8c17fa1fa1564962a33c6c7596";
sha256 = "2928063e6dfe4be7b69c8e72e4d6a5fc557f0c75e9625fadf607d59b8e80e34b";
};
}
{
root = "github.com/eckardt/influxdb-go";
src = fetchgit {
url = https://github.com/eckardt/influxdb-go.git;
rev = "8b71952efc257237e077c5d0672e936713bad38f";
sha256 = "5318c7e1131ba2330c90a1b67855209e41d3c77811b1d212a96525b42d391f6e";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View file

@ -7995,6 +7995,8 @@ let
influxdb = callPackage ../servers/nosql/influxdb { };
influxdb-backup = callPackage ../servers/nosql/influxdb/backup.nix { };
hyperdex = callPackage ../servers/nosql/hyperdex { };
mysql51 = import ../servers/sql/mysql/5.1.x.nix {