2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, docutils, removeReferencesTo }:
|
2022-01-07 14:53:17 +00:00
|
|
|
let
|
|
|
|
common = { version, sha256, extraNativeBuildInputs ? [] }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "${varnish.name}-modules";
|
|
|
|
inherit version;
|
2017-07-15 22:17:53 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "varnish-modules";
|
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2017-07-15 22:17:53 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docutils
|
|
|
|
pkg-config
|
|
|
|
removeReferencesTo
|
|
|
|
varnish.python # use same python version as varnish server
|
|
|
|
];
|
2019-08-15 15:14:40 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
buildInputs = [ varnish ];
|
2017-07-15 22:17:53 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bootstrap --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
'';
|
2018-03-20 06:19:32 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
|
2017-11-26 11:51:29 +00:00
|
|
|
|
2022-01-07 14:53:17 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
|
|
|
homepage = "https://github.com/varnish/varnish-modules";
|
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
modules15 = common {
|
|
|
|
version = "0.15.1";
|
|
|
|
sha256 = "1lwgjhgr5yw0d17kbqwlaj5pkn70wvaqqjpa1i0n459nx5cf5pqj";
|
|
|
|
};
|
2023-10-09 12:16:32 +00:00
|
|
|
modules23 = common {
|
|
|
|
version = "0.23.0";
|
|
|
|
sha256 = "sha256-Dd1pLMmRC59iRRpReDeQJ8Sv00ojb8InvaMrb+iRv4I=";
|
2023-05-20 11:44:02 +00:00
|
|
|
};
|
2017-07-15 22:17:53 +00:00
|
|
|
}
|