From c13922f0120d43f491ee286fd9362dd12833b9e5 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 20 Mar 2017 19:58:52 +0100 Subject: [PATCH] nginx: explicitly use stable version Also updates the documention of the NixOS option `services.nginx.package` that upstream recommends using the mainline version instead. Fixes #21665. --- nixos/modules/services/web-servers/nginx/default.nix | 8 +++++--- pkgs/servers/http/nginx/generic.nix | 2 +- pkgs/top-level/all-packages.nix | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 548467ae7856..4e57b920a7d8 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -246,11 +246,13 @@ in }; package = mkOption { - default = pkgs.nginx; - defaultText = "pkgs.nginx"; + default = pkgs.nginxStable; + defaultText = "pkgs.nginxStable"; type = types.package; description = " - Nginx package to use. + Nginx package to use. This defaults to the stable version. Note + that the nginx team recommends to use the mainline version which + available in nixpkgs as nginxMainline. "; }; diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 5d5a98ad8a8f..dfde20452723 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -62,6 +62,6 @@ stdenv.mkDerivation { homepage = http://nginx.org; license = licenses.bsd2; platforms = platforms.all; - maintainers = with maintainers; [ thoughtpolice raskin ]; + maintainers = with maintainers; [ thoughtpolice raskin fpletz ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 144fcbd27295..2e72eda08f5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10687,7 +10687,9 @@ with pkgs; neard = callPackage ../servers/neard { }; - nginx = callPackage ../servers/http/nginx/stable.nix { + nginx = nginxStable; + + nginxStable = callPackage ../servers/http/nginx/stable.nix { # We don't use `with` statement here on purpose! # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];