mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
commit
2358582976
@ -251,6 +251,7 @@
|
||||
olcai = "Erik Timan <dev@timan.info>";
|
||||
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
||||
osener = "Ozan Sener <ozan@ozansener.com>";
|
||||
otwieracz = "Slawomir Gonet <slawek@otwiera.cz>";
|
||||
oxij = "Jan Malakhovski <oxij@oxij.org>";
|
||||
page = "Carles Pagès <page@cubata.homelinux.net>";
|
||||
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
||||
|
@ -114,6 +114,7 @@
|
||||
./services/backup/rsnapshot.nix
|
||||
./services/backup/sitecopy-backup.nix
|
||||
./services/backup/tarsnap.nix
|
||||
./services/backup/znapzend.nix
|
||||
./services/cluster/fleet.nix
|
||||
./services/cluster/kubernetes.nix
|
||||
./services/cluster/panamax.nix
|
||||
|
36
nixos/modules/services/backup/znapzend.nix
Normal file
36
nixos/modules/services/backup/znapzend.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.znapzend;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.znapzend = {
|
||||
enable = mkEnableOption "ZnapZend daemon";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.znapzend ];
|
||||
|
||||
systemd.services = {
|
||||
"znapzend" = {
|
||||
description = "ZnapZend - ZFS Backup System";
|
||||
after = [ "zfs.target" ];
|
||||
|
||||
path = with pkgs; [ znapzend zfs mbuffer openssh ];
|
||||
|
||||
script = ''
|
||||
znapzend
|
||||
'';
|
||||
|
||||
reload = ''
|
||||
/bin/kill -HUP $MAINPID
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
72
pkgs/tools/backup/znapzend/default.nix
Normal file
72
pkgs/tools/backup/znapzend/default.nix
Normal file
@ -0,0 +1,72 @@
|
||||
{ stdenv, fetchFromGitHub, zfs, mbuffer, perl, perlPackages, wget, autoconf, automake }:
|
||||
|
||||
let
|
||||
version = "0.15.3";
|
||||
checksum = "1xk0lgb23kv1cl0wc2rav75hjrjigd0cp3hjw9gxab835vsvnkq0";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "znapzend-${version}";
|
||||
|
||||
src = fetchFromGitHub{
|
||||
owner = "oetiker";
|
||||
repo = "znapzend";
|
||||
rev = "v${version}";
|
||||
sha256 = checksum;
|
||||
};
|
||||
|
||||
buildInputs = [ perl perlPackages.TestHarness perlPackages.Mojolicious
|
||||
perlPackages.TAPParserSourceHandlerpgTAP perlPackages.MojoIOLoopForkCall
|
||||
perlPackages.IOPipely wget ];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i 's/^SUBDIRS =.*$/SUBDIRS = lib/' Makefile.am
|
||||
|
||||
grep -v thirdparty/Makefile configure.ac > configure.ac.tmp
|
||||
mv configure.ac.tmp configure.ac
|
||||
|
||||
autoconf
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
aclocal
|
||||
automake
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/bin/znapzend --replace "${perl}/bin/perl" \
|
||||
"${perl}/bin/perl \
|
||||
-I${perlPackages.TestHarness}/${perl.libPrefix} \
|
||||
-I${perlPackages.Mojolicious}/${perl.libPrefix} \
|
||||
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
||||
-I${perlPackages.MojoIOLoopForkCall}/${perl.libPrefix} \
|
||||
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
||||
"
|
||||
substituteInPlace $out/bin/znapzendzetup --replace "${perl}/bin/perl" \
|
||||
"${perl}/bin/perl \
|
||||
-I${perlPackages.TestHarness}/${perl.libPrefix} \
|
||||
-I${perlPackages.Mojolicious}/${perl.libPrefix} \
|
||||
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
||||
-I${perlPackages.MojoIOLoopForkCall}/${perl.libPrefix} \
|
||||
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
||||
"
|
||||
substituteInPlace $out/bin/znapzendztatz --replace "${perl}/bin/perl" \
|
||||
"${perl}/bin/perl \
|
||||
-I${perlPackages.TestHarness}/${perl.libPrefix} \
|
||||
-I${perlPackages.Mojolicious}/${perl.libPrefix} \
|
||||
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
||||
-I${perlPackages.MojoIOLoopForkCall}/${perl.libPrefix} \
|
||||
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
||||
"
|
||||
'';
|
||||
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "High performance open source ZFS backup with mbuffer and ssh support";
|
||||
homepage = http://www.znapzend.org;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ otwieracz ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -3274,6 +3274,8 @@ in
|
||||
|
||||
talkfilters = callPackage ../misc/talkfilters {};
|
||||
|
||||
znapzend = callPackage ../tools/backup/znapzend { };
|
||||
|
||||
tarsnap = callPackage ../tools/backup/tarsnap { };
|
||||
|
||||
tcpcrypt = callPackage ../tools/security/tcpcrypt { };
|
||||
|
@ -7792,17 +7792,43 @@ let self = _self // overrides; _self = with self; {
|
||||
description = "Embed a Perl interpreter in the Apache HTTP server";
|
||||
};
|
||||
};
|
||||
|
||||
Mojolicious = buildPerlPackage {
|
||||
name = "Mojolicious-4.63";
|
||||
Mojolicious = buildPerlPackage rec {
|
||||
name = "Mojolicious-6.56";
|
||||
src = fetchurl {
|
||||
url = mirror://cpan/authors/id/S/SR/SRI/Mojolicious-4.63.tar.gz;
|
||||
sha256 = "f20f77e86fc560dac1c958e765ed64242dcf6343939ed605b45f2bbe2596d5e9";
|
||||
url = "mirror://cpan/authors/id/S/SR/SRI/${name}.tar.gz";
|
||||
sha256 = "82f73553836ac378edf825fd9f24be982653be9e0d78f8ba38b7841aabdafb02";
|
||||
};
|
||||
propagatedBuildInputs = [ JSONPP ];
|
||||
meta = {
|
||||
homepage = http://mojolicious.org;
|
||||
description = "Real-time web framework";
|
||||
license = with stdenv.lib.licenses; [ artistic2 ];
|
||||
};
|
||||
};
|
||||
|
||||
MojoIOLoopForkCall = buildPerlModule rec {
|
||||
name = "Mojo-IOLoop-ForkCall-0.17";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/J/JB/JBERGER/${name}.tar.gz";
|
||||
sha256 = "886de5c3b44194a86228471075fac4036073bda19093e776c702aa65c3ef1824";
|
||||
};
|
||||
propagatedBuildInputs = [ IOPipely Mojolicious ];
|
||||
meta = {
|
||||
description = "Run blocking functions asynchronously by forking";
|
||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
||||
};
|
||||
};
|
||||
|
||||
IOPipely = buildPerlPackage rec {
|
||||
name = "IO-Pipely-0.005";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/R/RC/RCAPUTO/${name}.tar.gz";
|
||||
sha256 = "e33b6cf5cb2b46ee308513f51e623987a50a89901e81bf19701dce35179f2e74";
|
||||
};
|
||||
meta = {
|
||||
homepage = http://mojolicio.us;
|
||||
description = "Real-time web framework";
|
||||
license = stdenv.lib.licenses.artistic2;
|
||||
homepage = http://search.cpan.org/dist/IO-Pipely/;
|
||||
description = "Portably create pipe() or pipe-like handles";
|
||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user