Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 bundlerEnv,
5 ruby,
6 bundlerUpdateScript,
7 makeWrapper,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "lvmsync";
12 version = (import ./gemset.nix).${pname}.version;
13
14 nativeBuildInputs = [ makeWrapper ];
15
16 dontUnpack = true;
17
18 installPhase =
19 let
20 env = bundlerEnv {
21 name = "${pname}-${version}-gems";
22 ruby = ruby;
23 gemfile = ./Gemfile;
24 lockfile = ./Gemfile.lock;
25 gemset = ./gemset.nix;
26 };
27 in
28 ''
29 mkdir -p $out/bin
30 makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync
31 '';
32
33 passthru.updateScript = bundlerUpdateScript "lvmsync";
34
35 meta = with lib; {
36 description = "Optimised synchronisation of LVM snapshots over a network";
37 mainProgram = "lvmsync";
38 homepage = "https://theshed.hezmatt.org/lvmsync/";
39 license = licenses.gpl3;
40 platforms = platforms.all;
41 maintainers = with maintainers; [
42 jluttine
43 nicknovitski
44 ];
45 };
46
47}