diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-26 23:38:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-26 23:38:55 +0000 |
commit | 02e12559a420f8c544b2facc4931904900a05518 (patch) | |
tree | ba39d8fa9e874b935d204e74accfed5caaccf0fa /nixpkgs/pkgs/servers/web-apps | |
parent | 542f80867c380b0ac79250b6e5358dda8bc49e0d (diff) | |
parent | 3d085a399c436a41d875801619e8f976b8519196 (diff) | |
download | nixlib-02e12559a420f8c544b2facc4931904900a05518.tar nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.gz nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.bz2 nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.lz nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.xz nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.zst nixlib-02e12559a420f8c544b2facc4931904900a05518.zip |
Merge commit '3d085a399c436a41d875801619e8f976b8519196'
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps')
-rw-r--r-- | nixpkgs/pkgs/servers/web-apps/dokuwiki/default.nix | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/dokuwiki/default.nix b/nixpkgs/pkgs/servers/web-apps/dokuwiki/default.nix index ff6fa982228c..f12a75c8e18b 100644 --- a/nixpkgs/pkgs/servers/web-apps/dokuwiki/default.nix +++ b/nixpkgs/pkgs/servers/web-apps/dokuwiki/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, writeText }: stdenv.mkDerivation rec { pname = "dokuwiki"; @@ -11,9 +11,38 @@ stdenv.mkDerivation rec { sha256 = "1na5pn4j4mi2la80ywzg1krwqdxz57mjkw0id6ga9rws809gkdjp"; }; + preload = writeText "preload.php" '' + <?php + + $config_cascade = array( + 'acl' => array( + 'default' => getenv('DOKUWIKI_ACL_AUTH_CONFIG'), + ), + 'plainauth.users' => array( + 'default' => getenv('DOKUWIKI_USERS_AUTH_CONFIG'), + 'protected' => "" // not used by default + ), + ); + ''; + + phpLocalConfig = writeText "local.php" '' + <?php + return require(getenv('DOKUWIKI_LOCAL_CONFIG')); + ?> + ''; + + phpPluginsLocalConfig = writeText "plugins.local.php" '' + <?php + return require(getenv('DOKUWIKI_PLUGINS_LOCAL_CONFIG')); + ?> + ''; + installPhase = '' mkdir -p $out/share/dokuwiki cp -r * $out/share/dokuwiki + cp ${preload} $out/share/dokuwiki/inc/preload.php + cp ${phpLocalConfig} $out/share/dokuwiki/conf/local.php + cp ${phpPluginsLocalConfig} $out/share/dokuwiki/conf/plugins.local.php ''; meta = with stdenv.lib; { |