mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
uses EOL pcre, complicates our handling inside Nixpkgs. There are much newer versions available.
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
autoreconfHook,
|
|
pkg-config,
|
|
varnish,
|
|
docutils,
|
|
removeReferencesTo,
|
|
}:
|
|
let
|
|
common =
|
|
{
|
|
version,
|
|
hash,
|
|
extraNativeBuildInputs ? [ ],
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "${varnish.name}-modules";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "varnish";
|
|
repo = "varnish-modules";
|
|
tag = version;
|
|
inherit hash;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
docutils
|
|
pkg-config
|
|
removeReferencesTo
|
|
varnish.python # use same python version as varnish server
|
|
];
|
|
|
|
buildInputs = [ varnish ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace bootstrap --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
|
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
|
'';
|
|
|
|
postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
|
|
|
|
meta = {
|
|
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
|
homepage = "https://github.com/varnish/varnish-modules";
|
|
inherit (varnish.meta) license platforms;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
modules27 = common {
|
|
version = "0.27.0";
|
|
hash = "sha256-1hE+AKsC6Td+Al7LFN6bgPicU8dtWd3A8PP7VKZLvYM=";
|
|
};
|
|
}
|