2019-12-25 22:04:55 +00:00
|
|
|
{ stdenv, fetchFromGitHub, writeText }:
|
2019-11-03 15:43:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dokuwiki";
|
2020-08-09 16:07:26 +01:00
|
|
|
version = "2020-07-29";
|
2019-11-03 15:43:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "splitbrain";
|
|
|
|
repo = "${pname}";
|
|
|
|
rev = "release_stable_${version}";
|
2020-08-09 16:07:26 +01:00
|
|
|
sha256 = "09swcqyd06l3481k190gmlr3b33dlv1lw1kk9nyh5b4sa5p3k7kk";
|
2019-11-03 15:43:57 +00:00
|
|
|
};
|
|
|
|
|
2019-12-25 22:04:55 +00:00
|
|
|
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'));
|
|
|
|
?>
|
|
|
|
'';
|
|
|
|
|
2019-11-03 15:43:57 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/dokuwiki
|
|
|
|
cp -r * $out/share/dokuwiki
|
2019-12-25 22:04:55 +00:00
|
|
|
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
|
2019-11-03 15:43:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple to use and highly versatile Open Source wiki software that doesn't require a database";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = "https://www.dokuwiki.org";
|
|
|
|
platforms = platforms.all;
|
2020-07-29 11:57:20 +01:00
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2019-11-03 15:43:57 +00:00
|
|
|
};
|
|
|
|
}
|