2021-07-26 01:45:14 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, libmhash, docutils, coreutils, version, sha256 }:
|
2017-07-15 22:17:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 21:53:02 +00:00
|
|
|
pname = "${varnish.name}-digest";
|
2021-07-26 01:45:00 +00:00
|
|
|
inherit version;
|
2017-07-15 22:17:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varnish";
|
|
|
|
repo = "libvmod-digest";
|
2021-07-26 01:45:00 +00:00
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
2017-07-15 22:17:53 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config docutils ];
|
2017-07-15 22:17:53 +00: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 22:17:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
|
|
|
|
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ];
|
2019-11-02 23:07:47 +00:00
|
|
|
|
2017-07-15 22:17:53 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 22:17:53 +00:00
|
|
|
description = "Digest and HMAC vmod";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/varnish/libvmod-digest";
|
2017-07-15 22:17:53 +00:00
|
|
|
inherit (varnish.meta) license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|