nixpkgs-suyu/pkgs/tools/backup/lvmsync/default.nix

35 lines
862 B
Nix
Raw Normal View History

{ lib, stdenv, bundlerEnv, ruby, bundlerUpdateScript, makeWrapper }:
2017-12-31 10:12:41 +01:00
stdenv.mkDerivation rec {
2017-12-31 10:12:41 +01:00
pname = "lvmsync";
2019-08-13 23:52:01 +02:00
version = (import ./gemset.nix).${pname}.version;
2017-12-31 10:12:41 +01:00
buildInputs = [ makeWrapper ];
2021-07-17 22:20:18 +02:00
dontUnpack = true;
2017-12-31 10:12:41 +01:00
installPhase = let
env = bundlerEnv {
name = "${pname}-${version}-gems";
ruby = ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in ''
2017-12-31 10:12:41 +01:00
mkdir -p $out/bin
makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync
'';
passthru.updateScript = bundlerUpdateScript "lvmsync";
meta = with lib; {
2017-12-31 10:12:41 +01:00
description = "Optimised synchronisation of LVM snapshots over a network";
homepage = "https://theshed.hezmatt.org/lvmsync/";
2017-12-31 10:12:41 +01:00
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ jluttine nicknovitski ];
2017-12-31 10:12:41 +01:00
};
}