Files
nixpkgs/pkgs/by-name/lv/lvmsync/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

48 lines
955 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 = {
description = "Optimised synchronisation of LVM snapshots over a network";
mainProgram = "lvmsync";
homepage = "https://theshed.hezmatt.org/lvmsync/";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
jluttine
nicknovitski
];
};
}