1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 varnish,
8 docutils,
9 version,
10 sha256,
11}:
12
13stdenv.mkDerivation {
14 pname = "${varnish.name}-dynamic";
15 inherit version;
16
17 src = fetchFromGitHub {
18 owner = "nigoroll";
19 repo = "libvmod-dynamic";
20 rev = "v${version}";
21 inherit sha256;
22 };
23
24 nativeBuildInputs = [
25 pkg-config
26 docutils
27 autoreconfHook
28 varnish.python
29 ];
30 buildInputs = [ varnish ];
31 postPatch = ''
32 substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
33 '';
34 configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
35
36 meta = with lib; {
37 description = "Dynamic director similar to the DNS director from Varnish 3";
38 homepage = "https://github.com/nigoroll/libvmod-dynamic";
39 inherit (varnish.meta) license platforms teams;
40 };
41}