aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps/dokuwiki
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/webapps/dokuwiki')
-rw-r--r--pkgs/webapps/dokuwiki/default.nix45
-rw-r--r--pkgs/webapps/dokuwiki/dokuwiki.json15
-rw-r--r--pkgs/webapps/dokuwiki/plugins/farmer.nix25
-rw-r--r--pkgs/webapps/dokuwiki/plugins/todo.nix18
4 files changed, 0 insertions, 103 deletions
diff --git a/pkgs/webapps/dokuwiki/default.nix b/pkgs/webapps/dokuwiki/default.nix
deleted file mode 100644
index 874f0d8..0000000
--- a/pkgs/webapps/dokuwiki/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
1{ varDir ? "/var/lib/dokuwiki", preload ? "", lib, callPackage, stdenv, mylibs, writeText }:
2let
3 preloadFile = plugins: let preloads = [preload]
4 ++ builtins.concatMap (p: lib.optional (lib.hasAttr "preload" p) (p.preload p)) plugins;
5 in writeText "preload.php" (''
6 <?php
7 '' + builtins.concatStringsSep "\n" preloads
8 );
9 pluginNames = [ "farmer" "todo" ];
10 allPlugins = lib.attrsets.genAttrs pluginNames
11 (name: callPackage (./plugins + "/${name}.nix") {});
12 toPassthru = pkg: plugins: {
13 inherit plugins varDir allPlugins;
14 withPlugins = withPlugins pkg;
15 };
16 withPlugins = pkg: toPlugins:
17 let
18 plugins = toPlugins allPlugins;
19 toInstallPlugin = n:
20 "ln -sf ${n} $out/lib/plugins/${n.pluginName}";
21 newDokuwiki = pkg.overrideAttrs(old: {
22 installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallPlugin plugins);
23 installPreloadPhase = ''
24 cp ${preloadFile (pkg.plugins ++ plugins)} $out/inc/preload.php
25 '';
26 passthru = toPassthru newDokuwiki (pkg.plugins ++ plugins);
27 });
28 in newDokuwiki;
29 package = stdenv.mkDerivation (mylibs.fetchedGithub ./dokuwiki.json // rec {
30 phases = "unpackPhase buildPhase installPhase installPreloadPhase fixupPhase";
31 buildPhase = ''
32 mv conf conf.dist
33 mv data data.dist
34 '';
35 installPhase = ''
36 cp -a . $out
37 ln -sf ${varDir}/{conf,data} $out/
38 ln -sf ${varDir}/conf/.htaccess $out/
39 '';
40 installPreloadPhase = ''
41 cp ${preloadFile []} $out/inc/preload.php
42 '';
43 passthru = toPassthru package [];
44 });
45in package
diff --git a/pkgs/webapps/dokuwiki/dokuwiki.json b/pkgs/webapps/dokuwiki/dokuwiki.json
deleted file mode 100644
index fc03252..0000000
--- a/pkgs/webapps/dokuwiki/dokuwiki.json
+++ /dev/null
@@ -1,15 +0,0 @@
1{
2 "tag": "release_stable_2018-04-22b",
3 "meta": {
4 "name": "dokuwiki",
5 "url": "https://github.com/splitbrain/dokuwiki",
6 "branch": "refs/tags/release_stable_2018-04-22b"
7 },
8 "github": {
9 "owner": "splitbrain",
10 "repo": "dokuwiki",
11 "rev": "871dae1320b40211626c7ec665f5e6d5290aca95",
12 "sha256": "1syvd5dvv3v75swf8ig7dxqs0g5xikb0f6vlcy7g4c4ghldkw7nz",
13 "fetchSubmodules": true
14 }
15}
diff --git a/pkgs/webapps/dokuwiki/plugins/farmer.nix b/pkgs/webapps/dokuwiki/plugins/farmer.nix
deleted file mode 100644
index b737b2d..0000000
--- a/pkgs/webapps/dokuwiki/plugins/farmer.nix
+++ /dev/null
@@ -1,25 +0,0 @@
1{ stdenv, fetchFromGitHub }:
2stdenv.mkDerivation rec {
3 version = "72b8577-master";
4 name = "dokuwiki-plugin-farmer-${version}";
5 src = fetchFromGitHub {
6 owner = "cosmocode";
7 repo = "dokuwiki-plugin-farmer";
8 rev = "72b857734fd164bf79cc6e17abe56491d55c1072";
9 sha256 = "1c9vc1z7yvzjz4p054kshb9yd00a4bb52s43k9zav0lvwvjij9l0";
10 };
11 installPhase = ''
12 mkdir $out
13 cp -a * $out
14 '';
15 passthru = {
16 pluginName = "farmer";
17 preload = out: ''
18 # farm setup by farmer plugin
19 if (file_exists('${out}/DokuWikiFarmCore.php'))
20 {
21 include('${out}/DokuWikiFarmCore.php');
22 }
23 '';
24 };
25}
diff --git a/pkgs/webapps/dokuwiki/plugins/todo.nix b/pkgs/webapps/dokuwiki/plugins/todo.nix
deleted file mode 100644
index a3e03fb..0000000
--- a/pkgs/webapps/dokuwiki/plugins/todo.nix
+++ /dev/null
@@ -1,18 +0,0 @@
1{ stdenv, fetchFromGitHub }:
2stdenv.mkDerivation rec {
3 version = "49068ec-master";
4 name = "dokuwiki-plugin-todo-${version}";
5 src = fetchFromGitHub {
6 owner = "leibler";
7 repo = "dokuwiki-plugin-todo";
8 rev = "49068ecea455ea997d1e4a7adab171ccaf8228e8";
9 sha256 = "1jaq623kp14fyhamsas5mk9ryqlk4q6x6znijrb5xhcdg3r83gmq";
10 };
11 installPhase = ''
12 mkdir $out
13 cp -a * $out
14 '';
15 passthru = {
16 pluginName = "todo";
17 };
18}