2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, perl, perlPackages, wget, autoconf, automake }:
|
2016-03-24 09:51:59 +00:00
|
|
|
|
|
|
|
let
|
2018-06-04 16:33:32 +01:00
|
|
|
# when upgrade znapzend, check versions of Perl libs here: https://github.com/oetiker/znapzend/blob/master/PERL_MODULES
|
2018-06-04 12:25:38 +01:00
|
|
|
Mojolicious-6-46 = perlPackages.buildPerlPackage rec {
|
|
|
|
name = "Mojolicious-6.46";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://cpan/authors/id/S/SR/SRI/${name}.tar.gz";
|
|
|
|
sha256 = "0i3axmx4506fx5gms148pj65x6ys7flaz1aqjd8hd9zfkd8pzdfr";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
MojoIOLoopForkCall-0-17 = perlPackages.buildPerlModule rec {
|
|
|
|
name = "Mojo-IOLoop-ForkCall-0.17";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://cpan/authors/id/J/JB/JBERGER/${name}.tar.gz";
|
|
|
|
sha256 = "090qxz1nbah2qxvfg4whl6yp6q03qkx7a42751iai521nk1yavc8";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ perlPackages.IOPipely Mojolicious-6-46 ];
|
|
|
|
};
|
|
|
|
|
2018-04-17 02:11:29 +01:00
|
|
|
version = "0.18.0";
|
|
|
|
checksum = "1nlvw56viwgafma506slywfg54z6009jmzc9q6wljgr6mqfmmchd";
|
2016-03-24 09:51:59 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "znapzend-${version}";
|
|
|
|
|
2016-04-26 00:02:04 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-03-24 09:51:59 +00:00
|
|
|
owner = "oetiker";
|
|
|
|
repo = "znapzend";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = checksum;
|
|
|
|
};
|
|
|
|
|
2018-12-14 15:40:36 +00:00
|
|
|
buildInputs = [ wget perl MojoIOLoopForkCall-0-17 perlPackages.TAPParserSourceHandlerpgTAP ];
|
2016-03-24 09:51:59 +00:00
|
|
|
|
|
|
|
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 \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${Mojolicious-6-46}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-17}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
|
|
|
"
|
|
|
|
substituteInPlace $out/bin/znapzendzetup --replace "${perl}/bin/perl" \
|
|
|
|
"${perl}/bin/perl \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${Mojolicious-6-46}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-17}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-I${perlPackages.IOPipely}/${perl.libPrefix} \
|
|
|
|
"
|
|
|
|
substituteInPlace $out/bin/znapzendztatz --replace "${perl}/bin/perl" \
|
|
|
|
"${perl}/bin/perl \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${Mojolicious-6-46}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-I${perlPackages.TAPParserSourceHandlerpgTAP}/${perl.libPrefix} \
|
2018-06-04 12:25:38 +01:00
|
|
|
-I${MojoIOLoopForkCall-0-17}/${perl.libPrefix} \
|
2016-03-24 09:51:59 +00:00
|
|
|
-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;
|
|
|
|
};
|
|
|
|
}
|