aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/webapps/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'flakes/mypackages/pkgs/webapps/phpbb')
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/default.nix61
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/adduser.nix22
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/autosubscribe.nix19
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/mailinglist.nix18
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/markdown.nix20
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/mchat.nix21
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/extensions/monitoranswers.nix19
-rw-r--r--flakes/mypackages/pkgs/webapps/phpbb/langs/fr.nix12
8 files changed, 192 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/default.nix b/flakes/mypackages/pkgs/webapps/phpbb/default.nix
new file mode 100644
index 0000000..21ee154
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/default.nix
@@ -0,0 +1,61 @@
1{ stdenv, fetchurl, callPackage
2, varDir ? "/var/lib/phpbb"
3}:
4let
5 allExts = {
6 alfredoramos.markdown = callPackage ./extensions/markdown.nix {};
7 davidiq.mailinglist = callPackage ./extensions/mailinglist.nix {};
8 dmzx.mchat = callPackage ./extensions/mchat.nix {};
9 empteintesduweb.monitoranswers = callPackage ./extensions/monitoranswers.nix {};
10 lr94.autosubscribe = callPackage ./extensions/autosubscribe.nix {};
11 phpbbmodders.adduser = callPackage ./extensions/adduser.nix {};
12 };
13 allLangs = {
14 fr = callPackage ./langs/fr.nix {};
15 };
16 toPassthru = pkg: {
17 inherit allLangs allExts;
18 withLangs = withLangs pkg;
19 withExts = withExts pkg;
20 };
21 withExts = pkg: toExts:
22 let
23 exts = toExts allExts;
24 toInstallExt = ext: "cp -r ${ext}/* $out/ext/";
25 newPhpBB = pkg.overrideAttrs(old: {
26 installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallExt exts);
27 passthru = toPassthru newPhpBB;
28 });
29 in newPhpBB;
30 withLangs = pkg: toLangs:
31 let
32 langs = toLangs allLangs;
33 toInstallLang = lang: "cp -r ${lang}/*/ $out";
34 newPhpBB = pkg.overrideAttrs(old: {
35 installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallLang langs);
36 passthru = toPassthru newPhpBB;
37 });
38 in newPhpBB;
39 phpBB = stdenv.mkDerivation rec {
40 pname = "phpBB";
41 version = "3.3.0";
42
43 src = fetchurl {
44 url = "https://download.phpbb.com/pub/release/3.3/${version}/${pname}-${version}.tar.bz2";
45 sha256 = "a6234ac9dcf9086c025ece29a0a235f997a92bb9a994eff0ddcf8917e841262f";
46 };
47
48 phases = [ "unpackPhase" "installPhase" ];
49
50 installPhase = ''
51 cp -a . $out
52 mkdir -p $out/vars
53 mv $out/{cache,files,store,config.php} $out/vars
54 ln -s ${varDir}/{cache,files,store,config.php} $out/
55 echo -e "core:\n allow_install_dir: true" >> $out/config/production/config.yml
56 '';
57
58 passthru = toPassthru phpBB;
59 };
60in
61 phpBB
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/adduser.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/adduser.nix
new file mode 100644
index 0000000..f9073e6
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/adduser.nix
@@ -0,0 +1,22 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-adduser";
4 version = "1.0.4";
5 src = fetchurl {
6 # https://www.phpbb.com/customise/db/extension/acp_add_user_2
7 url = "https://www.phpbb.com/customise/db/download/141601";
8 sha256 = "13m4anib74cinnv1ap3b1ncb8cxm3mzhhmlqhbrr9mlrqmwf4zg2";
9 };
10
11 buildInputs = [ unzip ];
12 phases = [ "unpackPhase" "installPhase" ];
13 unpackPhase = ''
14 mkdir src
15 cd src
16 unzip $src
17 '';
18 installPhase = ''
19 cp -a . $out
20 cp -a $out/phpbbmodders/adduser/language/en $out/phpbbmodders/adduser/language/fr
21 '';
22}
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/autosubscribe.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/autosubscribe.nix
new file mode 100644
index 0000000..78e23fc
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/autosubscribe.nix
@@ -0,0 +1,19 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-autosubscribe";
4 version = "1.1.0";
5 src = fetchurl {
6 # https://www.phpbb.com/customise/db/extension/autosubscribe
7 url = "https://www.phpbb.com/customise/db/download/146556";
8 sha256 = "0dsay463g4impw86w1nv307nslc195fkgkqmihfn5kc0hya0giv0";
9 };
10
11 buildInputs = [ unzip ];
12 phases = [ "unpackPhase" "installPhase" ];
13 unpackPhase = ''
14 mkdir src
15 cd src
16 unzip $src
17 '';
18 installPhase = "cp -a . $out";
19}
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/mailinglist.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/mailinglist.nix
new file mode 100644
index 0000000..d432aaf
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/mailinglist.nix
@@ -0,0 +1,18 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-MailingList";
4 version = "2.0.0";
5 src = fetchurl {
6 url = "https://github.com/DavidIQ/MailingList/archive/${version}.tar.gz";
7 sha256 = "1ddg8bci85jwmvyakcwdn4yzqwz1rgy7ljf4nmfk9p2kvx2nhj62";
8 };
9
10 phases = [ "unpackPhase" "installPhase" ];
11 installPhase = ''
12 mkdir -p $out/davidiq/mailinglist
13 cp -a . $out/davidiq/mailinglist
14 # delete last two lines which contain EMAIL_SIG
15 sed -i -n -e :a -e '1,2!{P;N;D;};N;ba' $out/davidiq/mailinglist/language/en/email/*
16 '';
17}
18
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/markdown.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/markdown.nix
new file mode 100644
index 0000000..3bd73c7
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/markdown.nix
@@ -0,0 +1,20 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-markdown";
4 version = "1.2.0";
5 src = fetchurl {
6 # https://www.phpbb.com/customise/db/extension/markdown
7 name = "alfredoramos_markdown_${version}.zip";
8 url = "https://www.phpbb.com/customise/db/download/173626";
9 sha256 = "0bmgi8qr6azaaz8xnz8dkyf147dyawqvqr93r01qbm9s8bfkpzqx";
10 };
11
12 buildInputs = [ unzip ];
13 phases = [ "unpackPhase" "installPhase" ];
14 unpackPhase = ''
15 mkdir src
16 cd src
17 unzip $src
18 '';
19 installPhase = "cp -a . $out";
20}
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/mchat.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/mchat.nix
new file mode 100644
index 0000000..93ea861
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/mchat.nix
@@ -0,0 +1,21 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-mchat";
4 version = "2.1.3";
5 src = fetchurl {
6 # https://www.phpbb.com/customise/db/extension/mchat_extension
7 name = "dmzx_mchat_${version}.zip";
8 url = "https://www.phpbb.com/customise/db/download/168331";
9 sha256 = "0mcka02wamn899vg64m1c5d5k6f4qml18cshhzfvccrdc7a0m5p1";
10 };
11
12 buildInputs = [ unzip ];
13 phases = [ "unpackPhase" "installPhase" ];
14 unpackPhase = ''
15 mkdir src
16 cd src
17 unzip $src
18 '';
19 installPhase = "cp -a . $out";
20}
21
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/extensions/monitoranswers.nix b/flakes/mypackages/pkgs/webapps/phpbb/extensions/monitoranswers.nix
new file mode 100644
index 0000000..52c852e
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/extensions/monitoranswers.nix
@@ -0,0 +1,19 @@
1{ stdenv, fetchurl, unzip }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-extension-monitoranswers";
4 version = "1.0.0";
5 src = fetchurl {
6 # http://forums.phpbb-fr.com/extensions-developpement-en-cours/sujet208410.html
7 url = "https://www.empreintesduweb.com/dl/extension_empreintesduweb_monitoranswers_v100.zip";
8 sha256 = "0g5khzz7brkra9rnnjh8vsv11h8vf36pcw53b4wrkcjb66bfm20s";
9 };
10
11 buildInputs = [ unzip ];
12 phases = [ "unpackPhase" "installPhase" ];
13 unpackPhase = ''
14 mkdir src
15 cd src
16 unzip $src
17 '';
18 installPhase = "cp -a . $out";
19}
diff --git a/flakes/mypackages/pkgs/webapps/phpbb/langs/fr.nix b/flakes/mypackages/pkgs/webapps/phpbb/langs/fr.nix
new file mode 100644
index 0000000..12f2df0
--- /dev/null
+++ b/flakes/mypackages/pkgs/webapps/phpbb/langs/fr.nix
@@ -0,0 +1,12 @@
1{ stdenv, fetchurl }:
2stdenv.mkDerivation rec {
3 pname = "phpBB-language-fr";
4 version = "v4.0.0";
5 src = fetchurl {
6 url = "https://github.com/milescellar/phpbb-language-fr/archive/${version}.tar.gz";
7 sha256 = "0pkw55pb8ka4ayn1861hwvjwzs8vkq04yaxrs7zm9c8lh2g7y8z0";
8 };
9
10 phases = [ "unpackPhase" "installPhase" ];
11 installPhase = "cp -a . $out";
12}