nixpkgs/pkgs/tools/backup/lvmsync/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

36 lines
897 B
Nix

{ lib, stdenv, bundlerEnv, ruby, bundlerUpdateScript, makeWrapper }:
stdenv.mkDerivation rec {
pname = "lvmsync";
version = (import ./gemset.nix).${pname}.version;
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
installPhase = let
env = bundlerEnv {
name = "${pname}-${version}-gems";
ruby = ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in ''
mkdir -p $out/bin
makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync
'';
passthru.updateScript = bundlerUpdateScript "lvmsync";
meta = with lib; {
description = "Optimised synchronisation of LVM snapshots over a network";
mainProgram = "lvmsync";
homepage = "https://theshed.hezmatt.org/lvmsync/";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ jluttine nicknovitski ];
};
}