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
|
2024-05-03 19:03:01 +00:00
|
|
|
common = { version, hash, extraNativeBuildInputs ? [] }:
|
2022-01-07 14:53:17 +00:00
|
|
|
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;
|
2024-05-03 19:03:01 +00:00
|
|
|
inherit hash;
|
2022-01-07 14:53:17 +00:00
|
|
|
};
|
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";
|
2024-07-23 21:48:10 +00:00
|
|
|
hash = "sha256-Et/iWOk2FWJBDOpKjNXm4Nh5i1SU4zVPaID7kh+Uj9M=";
|
2022-01-07 14:53:17 +00:00
|
|
|
};
|
2024-05-03 19:03:01 +00:00
|
|
|
modules24 = common {
|
|
|
|
version = "0.24.0";
|
|
|
|
hash = "sha256-2MfcrhhkBz9GyQxEWzjipdn1CBEqnCvC3t1G2YSauak=";
|
2023-05-20 11:44:02 +00:00
|
|
|
};
|
2017-07-15 22:17:53 +00:00
|
|
|
}
|