2020-03-23 20:52:40 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, perl, perlPackages, wget, autoconf, automake, autoreconfHook }:
|
2016-03-24 10:51:59 +01:00
|
|
|
|
|
|
|
let
|
2020-03-23 20:52:40 +01:00
|
|
|
# when upgrade znapzend, check versions of Perl libs here: https://github.com/oetiker/znapzend/blob/master/cpanfile
|
|
|
|
# pinned versions are listed at https://github.com/oetiker/znapzend/blob/master/thirdparty/cpanfile-5.26.1.snapshot
|
|
|
|
Mojolicious-8-35 = perlPackages.buildPerlPackage rec {
|
2019-06-20 15:07:56 +02:00
|
|
|
pname = "Mojolicious";
|
2020-03-23 20:52:40 +01:00
|
|
|
version = "8.35";
|
2018-06-04 13:25:38 +02:00
|
|
|
src = fetchurl {
|
2019-06-20 15:07:56 +02:00
|
|
|
url = "mirror://cpan/authors/id/S/SR/SRI/${pname}-${version}.tar.gz";
|
2020-03-23 20:52:40 +01:00
|
|
|
sha256 = "1bll0ahh5v1y3x0ql29klwsa68cj46wzqc385srsnn2m8kh2ak8h";
|
2018-06-04 13:25:38 +02:00
|
|
|
};
|
|
|
|
};
|
2020-03-23 20:52:40 +01:00
|
|
|
MojoIOLoopForkCall-0-20 = perlPackages.buildPerlModule rec {
|
2019-06-20 15:07:56 +02:00
|
|
|
pname = "Mojo-IOLoop-ForkCall";
|
2020-03-23 20:52:40 +01:00
|
|
|
version = "0.20";
|
2018-06-04 13:25:38 +02:00
|
|
|
src = fetchurl {
|
2019-06-20 15:07:56 +02:00
|
|
|
url = "mirror://cpan/authors/id/J/JB/JBERGER/${pname}-${version}.tar.gz";
|
2020-03-23 20:52:40 +01:00
|
|
|
sha256 = "19pih5x0ayxs2m8j29qwdpi6ky3w4ghv6vrmax3ix9r59hj6569b";
|
2018-06-04 13:25:38 +02:00
|
|
|
};
|
2020-03-23 20:52:40 +01:00
|
|
|
propagatedBuildInputs = [ perlPackages.IOPipely Mojolicious-8-35 ];
|
2018-06-04 13:25:38 +02:00
|
|
|
};
|
|
|
|
|
2020-03-23 20:52:40 +01:00
|
|
|
version = "0.20.0";
|
|
|
|
checksum = "15lb5qwksa508m9bj6d3n4rrjpakfaas9qxspg408bcqfp7pqjw3";
|
2016-03-24 10:51:59 +01:00
|
|
|
in
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "znapzend";
|
|
|
|
inherit version;
|
2016-03-24 10:51:59 +01:00
|
|
|
|
2016-04-26 01:02:04 +02:00
|
|
|
src = fetchFromGitHub {
|
2016-03-24 10:51:59 +01:00
|
|
|
owner = "oetiker";
|
|
|
|
repo = "znapzend";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = checksum;
|
|
|
|
};
|
|
|
|
|
2020-03-23 20:52:40 +01:00
|
|
|
buildInputs = [ wget perl MojoIOLoopForkCall-0-20 perlPackages.TAPParserSourceHandlerpgTAP ];
|
2016-03-24 10:51:59 +01:00
|
|
|
|
2020-03-23 20:52:40 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake autoreconfHook ];
|
2016-03-24 10:51:59 +01:00
|
|
|
|
|
|
|
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 \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${Mojolicious-8-35}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
|
|
|
"
|
|
|
|
substituteInPlace $out/bin/znapzendzetup --replace "${perl}/bin/perl" \
|
|
|
|
"${perl}/bin/perl \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${Mojolicious-8-35}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
|
|
|
"
|
|
|
|
substituteInPlace $out/bin/znapzendztatz --replace "${perl}/bin/perl" \
|
|
|
|
"${perl}/bin/perl \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${Mojolicious-8-35}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2020-03-23 20:52:40 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-20}/${perl.libPrefix} \
|
2016-03-24 10:51:59 +01:00
|
|
|
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
|
|
|
"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "High performance open source ZFS backup with mbuffer and ssh support";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.znapzend.org";
|
2016-03-24 10:51:59 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ otwieracz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|