mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
wordpress: security upgrade: 4.7.2 -> 4.7.3 & other improvements (#23837)
* Moved the wordpress sources derivation to the attribute pkgs.wordpress. This makes it easier to override. * Also introduce the `package` option for the wordpress virtual host config which defaults to pkgs.wordpress. * Also fixed the test in nixos/tests/wordpress.nix.
This commit is contained in:
parent
e916236130
commit
308c09d41f
4 changed files with 27 additions and 19 deletions
|
@ -4,11 +4,6 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# Upgrading? We have a test! nix-build ./nixos/tests/wordpress.nix
|
||||
version = "4.7.2";
|
||||
fullversion = "${version}";
|
||||
|
||||
# Our bare-bones wp-config.php file using the above settings
|
||||
wordpressConfig = pkgs.writeText "wp-config.php" ''
|
||||
<?php
|
||||
|
@ -71,12 +66,7 @@ let
|
|||
# The wordpress package itself
|
||||
wordpressRoot = pkgs.stdenv.mkDerivation rec {
|
||||
name = "wordpress";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "WordPress";
|
||||
repo = "WordPress";
|
||||
rev = "${fullversion}";
|
||||
sha256 = "0vph12708drf8ww0xd05hpdvbyy7n5gj9ca598lhdhy2i1j6wy32";
|
||||
};
|
||||
src = config.package;
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
# copy all the wordpress files we downloaded
|
||||
|
@ -122,6 +112,14 @@ in
|
|||
enablePHP = true;
|
||||
|
||||
options = {
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.wordpress;
|
||||
description = ''
|
||||
Path to the wordpress sources.
|
||||
Upgrading? We have a test! nix-build ./nixos/tests/wordpress.nix
|
||||
'';
|
||||
};
|
||||
dbHost = mkOption {
|
||||
default = "localhost";
|
||||
description = "The location of the database server.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue