Files
nixpkgs/pkgs/servers/varnish/modules.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.5 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";
rev = 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 teams;
};
};
in
{
modules15 = common {
version = "0.15.1";
hash = "sha256-Et/iWOk2FWJBDOpKjNXm4Nh5i1SU4zVPaID7kh+Uj9M=";
};
modules26 = common {
version = "0.26.0";
hash = "sha256-xKMOkqm6/GoBve0AhPqyVMQv/oh5Rtj6uCeg/yId7BU=";
};
}