From bbeecc708efc080acab7d10b912bd881d78673fa Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sun, 31 Dec 2017 11:12:41 +0200 Subject: [PATCH] lvmsync: init at 3.3.2 --- pkgs/tools/backup/lvmsync/Gemfile | 2 ++ pkgs/tools/backup/lvmsync/Gemfile.lock | 19 +++++++++++++ pkgs/tools/backup/lvmsync/default.nix | 37 ++++++++++++++++++++++++++ pkgs/tools/backup/lvmsync/gemset.nix | 36 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 5 files changed, 96 insertions(+) create mode 100644 pkgs/tools/backup/lvmsync/Gemfile create mode 100644 pkgs/tools/backup/lvmsync/Gemfile.lock create mode 100644 pkgs/tools/backup/lvmsync/default.nix create mode 100644 pkgs/tools/backup/lvmsync/gemset.nix diff --git a/pkgs/tools/backup/lvmsync/Gemfile b/pkgs/tools/backup/lvmsync/Gemfile new file mode 100644 index 000000000000..a87462e2b8a2 --- /dev/null +++ b/pkgs/tools/backup/lvmsync/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org/' +gem 'lvmsync' diff --git a/pkgs/tools/backup/lvmsync/Gemfile.lock b/pkgs/tools/backup/lvmsync/Gemfile.lock new file mode 100644 index 000000000000..1fe903f15088 --- /dev/null +++ b/pkgs/tools/backup/lvmsync/Gemfile.lock @@ -0,0 +1,19 @@ +GEM + remote: https://rubygems.org/ + specs: + git-version-bump (0.15.1) + lvmsync (3.3.2) + git-version-bump (~> 0.10) + treetop + polyglot (0.3.5) + treetop (1.6.9) + polyglot (~> 0.3) + +PLATFORMS + ruby + +DEPENDENCIES + lvmsync + +BUNDLED WITH + 1.14.6 diff --git a/pkgs/tools/backup/lvmsync/default.nix b/pkgs/tools/backup/lvmsync/default.nix new file mode 100644 index 000000000000..dc589316a585 --- /dev/null +++ b/pkgs/tools/backup/lvmsync/default.nix @@ -0,0 +1,37 @@ +{ stdenv, bundlerEnv, ruby, makeWrapper }: + +let + + pname = "lvmsync"; + version = (import ./gemset.nix)."${pname}".version; + +in stdenv.mkDerivation rec { + + name = "${pname}-${version}"; + + env = bundlerEnv { + name = "${pname}-${version}-gems"; + ruby = ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + }; + + buildInputs = [ makeWrapper ]; + + phases = ["installPhase"]; + + installPhase = '' + mkdir -p $out/bin + makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync + ''; + + meta = with stdenv.lib; { + description = "Optimised synchronisation of LVM snapshots over a network"; + homepage = http://theshed.hezmatt.org/lvmsync/; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ jluttine ]; + }; + +} diff --git a/pkgs/tools/backup/lvmsync/gemset.nix b/pkgs/tools/backup/lvmsync/gemset.nix new file mode 100644 index 000000000000..7f80e928660b --- /dev/null +++ b/pkgs/tools/backup/lvmsync/gemset.nix @@ -0,0 +1,36 @@ +{ + git-version-bump = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xcj20gmbpqn2gcpid4pxpnimfdg2ip9jnl1572naz0magcrwl2s"; + type = "gem"; + }; + version = "0.15.1"; + }; + lvmsync = { + dependencies = ["git-version-bump" "treetop"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "02mdrvfibvab4p4yrdzxvndhy8drss3ri7izybcwgpbyc7isk8mv"; + type = "gem"; + }; + version = "3.3.2"; + }; + polyglot = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"; + type = "gem"; + }; + version = "0.3.5"; + }; + treetop = { + dependencies = ["polyglot"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0sdkd1v2h8dhj9ncsnpywmqv7w1mdwsyc5jwyxlxwriacv8qz8bd"; + type = "gem"; + }; + version = "1.6.9"; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 57c15125d2a3..bd27a82d721a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3008,6 +3008,8 @@ with pkgs; ltwheelconf = callPackage ../applications/misc/ltwheelconf { }; + lvmsync = callPackage ../tools/backup/lvmsync { }; + kippo = callPackage ../servers/kippo { }; kzipmix = callPackage_i686 ../tools/compression/kzipmix { };