2017-07-15 23:17:53 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, libmhash, docutils }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-03-20 06:19:32 +00:00
|
|
|
version = "1.0.2";
|
|
|
|
name = "${varnish.name}-digest-${version}";
|
2017-07-15 23:17:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "libvmod-digest";
|
|
|
|
rev = "libvmod-digest-${version}";
|
2018-03-20 06:19:32 +00:00
|
|
|
sha256 = "0jwkqqalydn0pwfdhirl5zjhbc3hldvhh09hxrahibr72fgmgpbx";
|
2017-07-15 23:17:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig docutils ];
|
|
|
|
buildInputs = [ varnish libmhash ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2018-03-20 06:19:32 +00:00
|
|
|
substituteInPlace autogen.sh --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
2017-07-15 23:17:53 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
|
|
|
|
|
2019-11-02 23:07:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
|
|
|
|
|
2017-07-15 23:17:53 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Digest and HMAC vmod";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/varnish/libvmod-digest";
|
2017-07-15 23:17:53 +01:00
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|