1 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, docutils, removeReferencesTo }:
3 common = { version, hash, extraNativeBuildInputs ? [] }:
4 stdenv.mkDerivation rec {
5 pname = "${varnish.name}-modules";
8 src = fetchFromGitHub {
10 repo = "varnish-modules";
20 varnish.python # use same python version as varnish server
23 buildInputs = [ varnish ];
26 substituteInPlace bootstrap --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
27 substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
30 postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
33 description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
34 homepage = "https://github.com/varnish/varnish-modules";
35 inherit (varnish.meta) license platforms maintainers;
42 hash = "sha256-Et/iWOk2FWJBDOpKjNXm4Nh5i1SU4zVPaID7kh+Uj9M=";
46 hash = "sha256-2MfcrhhkBz9GyQxEWzjipdn1CBEqnCvC3t1G2YSauak=";