forked from mirrors/nixpkgs
varnish: build modules for varnish 6 & 7.
This commit is contained in:
parent
d36d401087
commit
714a677850
|
@ -1,36 +1,48 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, docutils, removeReferencesTo }:
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, docutils, removeReferencesTo }:
|
||||||
|
let
|
||||||
|
common = { version, sha256, extraNativeBuildInputs ? [] }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "${varnish.name}-modules";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
src = fetchFromGitHub {
|
||||||
version = "0.15.0";
|
owner = "varnish";
|
||||||
pname = "${varnish.name}-modules";
|
repo = "varnish-modules";
|
||||||
|
rev = version;
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
nativeBuildInputs = [
|
||||||
owner = "varnish";
|
autoreconfHook
|
||||||
repo = "varnish-modules";
|
docutils
|
||||||
rev = version;
|
pkg-config
|
||||||
sha256 = "00p9syl765lfg1d2ka7da6h46dfl388f8h36x9cmrjix95rg0yr8";
|
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 = with lib; {
|
||||||
|
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
||||||
|
homepage = "https://github.com/varnish/varnish-modules";
|
||||||
|
inherit (varnish.meta) license platforms maintainers;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
modules15 = common {
|
||||||
|
version = "0.15.1";
|
||||||
|
sha256 = "1lwgjhgr5yw0d17kbqwlaj5pkn70wvaqqjpa1i0n459nx5cf5pqj";
|
||||||
};
|
};
|
||||||
|
modules19 = common {
|
||||||
nativeBuildInputs = [
|
version = "0.19.0";
|
||||||
autoreconfHook
|
sha256 = "0qq5g6bbd1a1ml1wk8jj9z39a899jzqbf7aizr3pvyz0f4kz8mis";
|
||||||
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 = with lib; {
|
|
||||||
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
|
||||||
homepage = "https://github.com/varnish/varnish-modules";
|
|
||||||
inherit (varnish.meta) license platforms maintainers;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ callPackage, varnish60, varnish70, fetchFromGitHub }: {
|
{ callPackages, callPackage, varnish60, varnish70, fetchFromGitHub }: {
|
||||||
varnish60Packages = rec {
|
varnish60Packages = rec {
|
||||||
varnish = varnish60;
|
varnish = varnish60;
|
||||||
|
modules = (callPackages ./modules.nix { inherit varnish; }).modules15;
|
||||||
digest = callPackage ./digest.nix {
|
digest = callPackage ./digest.nix {
|
||||||
inherit varnish;
|
inherit varnish;
|
||||||
version = "libvmod-digest-1.0.2";
|
version = "libvmod-digest-1.0.2";
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
};
|
};
|
||||||
varnish70Packages = rec {
|
varnish70Packages = rec {
|
||||||
varnish = varnish70;
|
varnish = varnish70;
|
||||||
|
modules = (callPackages ./modules.nix { inherit varnish; }).modules19;
|
||||||
digest = callPackage ./digest.nix {
|
digest = callPackage ./digest.nix {
|
||||||
inherit varnish;
|
inherit varnish;
|
||||||
version = "6.6";
|
version = "6.6";
|
||||||
|
|
Loading…
Reference in a new issue