@@ -4,11 +4,6 @@
44with lib;
55
66let
7−
8− # Upgrading? We have a test! nix-build ./nixos/tests/wordpress.nix
9− version = "4.7.2";
10− fullversion = "${version}";
11−
127 # Our bare-bones wp-config.php file using the above settings
138 wordpressConfig = pkgs.writeText "wp-config.php" ''
149 <?php
@@ -71,12 +66,7 @@ let
7166 # The wordpress package itself
7267 wordpressRoot = pkgs.stdenv.mkDerivation rec {
7368 name = "wordpress";
74− src = pkgs.fetchFromGitHub {
75− owner = "WordPress";
76− repo = "WordPress";
77− rev = "${fullversion}";
78− sha256 = "0vph12708drf8ww0xd05hpdvbyy7n5gj9ca598lhdhy2i1j6wy32";
79− };
69+ src = config.package;
8070 installPhase = ''
8171 mkdir -p $out
8272 # copy all the wordpress files we downloaded
@@ -122,6 +112,14 @@ in
122112 enablePHP = true;
123113
124114 options = {
115+ package = mkOption {
116+ type = types.path;
117+ default = pkgs.wordpress;
118+ description = ''
119+ Path to the wordpress sources.
120+ Upgrading? We have a test! nix-build ./nixos/tests/wordpress.nix
121+ '';
122+ };
125123 dbHost = mkOption {
126124 default = "localhost";
127125 description = "The location of the database server.";