mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
Add influxdb-backup
This commit is contained in:
parent
6e7d708bcc
commit
9eb3b108e8
31
pkgs/servers/nosql/influxdb/backup.nix
Normal file
31
pkgs/servers/nosql/influxdb/backup.nix
Normal 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;
|
||||
};
|
||||
}
|
35
pkgs/servers/nosql/influxdb/deps.nix
Normal file
35
pkgs/servers/nosql/influxdb/deps.nix
Normal 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);
|
||||
}
|
@ -7949,6 +7949,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user