From 1ea24769a088c9231a54f6e4a4f5055c3f04f544 Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Thu, 23 Jun 2011 20:56:37 +0000 Subject: [PATCH] added support for two custom themes and also wrote a nice looking nixos theme svn path=/nixos/trunk/; revision=27535 --- .../web-servers/apache-httpd/mediawiki.nix | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/services/web-servers/apache-httpd/mediawiki.nix b/modules/services/web-servers/apache-httpd/mediawiki.nix index 4b005a1b1cd..2c592c00634 100644 --- a/modules/services/web-servers/apache-httpd/mediawiki.nix +++ b/modules/services/web-servers/apache-httpd/mediawiki.nix @@ -4,6 +4,16 @@ with pkgs.lib; let + src_clean_skin = pkgs.fetchurl { + url = "http://lastlog.de/misc/clean-1.01.tar.gz"; + sha256 = "5fb1736b64b33ca3429d035f1358cf8217da2d02019d8a80b14c7985367f659f"; + }; + + src_nixos_skin = pkgs.fetchurl { + url = "http://lastlog.de/misc/nixos-1.0.tar.gz"; + sha256 = "413b0f451bde81ac2dd0bede17dd088f9abcd0f3cea1722279311ca648a855cf"; + }; + mediawikiConfig = pkgs.writeText "LocalSettings.php" '' ''; @@ -75,7 +89,15 @@ let sha256 = "1d8afbdh3lsg54b69mnh6a47psb3lg978xpp277qs08yz15cjf7q"; }; - buildPhase = "true"; + skinTarball = if config.defaultSkin == "clean" then src_clean_skin + else if config.defaultSkin == "nixos" then src_nixos_skin + else ""; + + buildPhase = " + if [ '${skinTarball}' ]; then + tar xfz ${skinTarball} -C skins/; + fi + "; installPhase = '' @@ -231,6 +253,12 @@ in description = "The directory that stores uploaded files."; }; + defaultSkin = mkOption { + default = "standard"; + example = "nostalgia"; + description = "Default skin: you can change the default skin."; + }; + extraConfig = mkOption { default = ""; example =