summary refs log tree commit diff
path: root/pkgs/servers/varnish/digest.nix
blob: 530ae5047712b51fec6f12ad088623183c69d736 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, libmhash, docutils }:

stdenv.mkDerivation rec {
  version = "1.0.1";
  name = "varnish-digest-${version}";

  src = fetchFromGitHub {
    owner = "varnish";
    repo = "libvmod-digest";
    rev = "libvmod-digest-${version}";
    sha256 = "0v18bqbsblhajpx5qvczic3psijhx5l2p2qlw1dkd6zl33hhppy7";
  };

  nativeBuildInputs = [ autoreconfHook pkgconfig docutils ];
  buildInputs = [ varnish libmhash ];

  postPatch = ''
    substituteInPlace autogen.sh  --replace "-I \''${dataroot}/aclocal"                  ""
    substituteInPlace Makefile.am --replace "-I \''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" ""
  '';

  configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];

  doCheck = true;

  meta = with stdenv.lib; {
    description = "Digest and HMAC vmod";
    homepage = https://github.com/varnish/libvmod-digest;
    inherit (varnish.meta) license platforms maintainers;
  };
}