2019-08-15 18:14:40 +03:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, docutils, removeReferencesTo }:
|
2017-07-16 01:17:53 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-03-20 09:19:32 +03:00
|
|
|
version = "0.14.0";
|
|
|
|
name = "${varnish.name}-modules-${version}";
|
2017-07-16 01:17:53 +03:00
|
|
|
|
2018-03-20 09:19:32 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "varnish-modules";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "17fkbr4i70qgdqsrx1x28ag20xkfyz1v3q3d3ywmv409aczqhm40";
|
2017-07-16 01:17:53 +03:00
|
|
|
};
|
|
|
|
|
2019-08-15 18:14:40 +03:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docutils
|
|
|
|
pkgconfig
|
|
|
|
removeReferencesTo
|
|
|
|
varnish.python # use same python version as varnish server
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ varnish ];
|
2017-07-16 01:17:53 +03:00
|
|
|
|
2018-03-20 09:19:32 +03:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bootstrap --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
'';
|
|
|
|
|
2017-11-26 14:51:29 +03:00
|
|
|
postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
|
|
|
|
|
2017-07-16 01:17:53 +03:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
|
|
|
homepage = https://github.com/varnish/varnish-modules;
|
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|