mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
nginx: let modules override the nginx derivation
A module that brings cmake needs dontUseCmakeConfigure set on nginx, which the existing per-module attributes can't express. Assisted-by: Claude:claude-fable-5-1
This commit is contained in:
@@ -68,12 +68,19 @@ let
|
||||
throw "Module ${mod.name} does not support nginx version ${nginxVersion}!"
|
||||
);
|
||||
|
||||
# Modules can adjust the nginx derivation through passthru.forNginx.
|
||||
mkDerivation =
|
||||
args:
|
||||
lib.foldl (drv: mod: drv.overrideAttrs mod.forNginx) (stdenv.mkDerivation args) (
|
||||
lib.filter (mod: mod ? forNginx) modules
|
||||
);
|
||||
|
||||
in
|
||||
|
||||
assert lib.assertMsg (lib.unique moduleNames == moduleNames)
|
||||
"nginx: duplicate modules: ${lib.concatStringsSep ", " moduleNames}. A common cause for this is that services.nginx.additionalModules adds a module which the nixos module itself already adds.";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
mkDerivation {
|
||||
inherit pname version nginxVersion;
|
||||
|
||||
outputs = [
|
||||
|
||||
Reference in New Issue
Block a user