2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, docutils, removeReferencesTo }:
|
2017-07-15 23:17:53 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-02 23:07:47 +00:00
|
|
|
version = "0.15.0";
|
2018-03-20 06:19:32 +00:00
|
|
|
name = "${varnish.name}-modules-${version}";
|
2017-07-15 23:17:53 +01:00
|
|
|
|
2018-03-20 06:19:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "varnish-modules";
|
|
|
|
rev = version;
|
2019-11-02 23:07:47 +00:00
|
|
|
sha256 = "00p9syl765lfg1d2ka7da6h46dfl388f8h36x9cmrjix95rg0yr8";
|
2017-07-15 23:17:53 +01:00
|
|
|
};
|
|
|
|
|
2019-08-15 16:14:40 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docutils
|
|
|
|
pkgconfig
|
|
|
|
removeReferencesTo
|
|
|
|
varnish.python # use same python version as varnish server
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ varnish ];
|
2017-07-15 23:17:53 +01:00
|
|
|
|
2018-03-20 06:19:32 +00: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 11:51:29 +00:00
|
|
|
postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 23:17:53 +01:00
|
|
|
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/varnish/varnish-modules";
|
2017-07-15 23:17:53 +01:00
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|