2021-07-26 02:45:14 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, libmhash, docutils, coreutils, version, sha256 }:
|
2017-07-15 23:17:53 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 22:53:02 +01:00
|
|
|
pname = "${varnish.name}-digest";
|
2021-07-26 02:45:00 +01:00
|
|
|
inherit version;
|
2017-07-15 23:17:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "libvmod-digest";
|
2021-07-26 02:45:00 +01:00
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
2017-07-15 23:17:53 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config docutils ];
|
2017-07-15 23:17:53 +01:00
|
|
|
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;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 23:17:53 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|