2021-08-18 13:19:15 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, libmhash, docutils, coreutils, version, sha256 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "${varnish.name}-digest";
|
2021-08-18 13:19:15 +00:00
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "libvmod-digest";
|
2021-08-18 13:19:15 +00:00
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config docutils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ varnish libmhash ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace autogen.sh --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Digest and HMAC vmod";
|
|
|
|
homepage = "https://github.com/varnish/libvmod-digest";
|
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|