diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/webapps/default.nix | 2 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/default.nix | 60 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/adduser.nix | 22 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/autosubscribe.nix | 19 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/mailinglist.nix | 18 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/markdown.nix | 20 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/mchat.nix | 21 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/extensions/monitoranswers.nix | 19 | ||||
-rw-r--r-- | pkgs/webapps/phpbb/langs/fr.nix | 12 |
9 files changed, 193 insertions, 0 deletions
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix index 8cc252d..3117f7e 100644 --- a/pkgs/webapps/default.nix +++ b/pkgs/webapps/default.nix | |||
@@ -69,6 +69,8 @@ rec { | |||
69 | (name: callPackage (./nextcloud/apps + "/${name}.nix") { buildApp = nextcloud.buildApp; }); | 69 | (name: callPackage (./nextcloud/apps + "/${name}.nix") { buildApp = nextcloud.buildApp; }); |
70 | 70 | ||
71 | peertube = callPackage ./peertube { inherit mylibs; }; | 71 | peertube = callPackage ./peertube { inherit mylibs; }; |
72 | phpbb = callPackage ./phpbb {}; | ||
73 | |||
72 | phpldapadmin = callPackage ./phpldapadmin {}; | 74 | phpldapadmin = callPackage ./phpldapadmin {}; |
73 | rompr = callPackage ./rompr { inherit mylibs; }; | 75 | rompr = callPackage ./rompr { inherit mylibs; }; |
74 | 76 | ||
diff --git a/pkgs/webapps/phpbb/default.nix b/pkgs/webapps/phpbb/default.nix new file mode 100644 index 0000000..d7d008e --- /dev/null +++ b/pkgs/webapps/phpbb/default.nix | |||
@@ -0,0 +1,60 @@ | |||
1 | { stdenv, fetchurl, callPackage | ||
2 | , varDir ? "/var/lib/phpbb" | ||
3 | }: | ||
4 | let | ||
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 | withLangs = withLangs pkg; | ||
18 | withExts = withExts pkg; | ||
19 | }; | ||
20 | withExts = pkg: toExts: | ||
21 | let | ||
22 | exts = toExts allExts; | ||
23 | toInstallExt = ext: "cp -r ${ext}/* $out/ext/"; | ||
24 | newPhpBB = pkg.overrideAttrs(old: { | ||
25 | installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallExt exts); | ||
26 | passthru = toPassthru newPhpBB; | ||
27 | }); | ||
28 | in newPhpBB; | ||
29 | withLangs = pkg: toLangs: | ||
30 | let | ||
31 | langs = toLangs allLangs; | ||
32 | toInstallLang = lang: "cp -r ${lang}/*/ $out"; | ||
33 | newPhpBB = pkg.overrideAttrs(old: { | ||
34 | installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallLang langs); | ||
35 | passthru = toPassthru newPhpBB; | ||
36 | }); | ||
37 | in newPhpBB; | ||
38 | phpBB = stdenv.mkDerivation rec { | ||
39 | pname = "phpBB"; | ||
40 | version = "3.3.0"; | ||
41 | |||
42 | src = fetchurl { | ||
43 | url = "https://download.phpbb.com/pub/release/3.3/${version}/${pname}-${version}.tar.bz2"; | ||
44 | sha256 = "a6234ac9dcf9086c025ece29a0a235f997a92bb9a994eff0ddcf8917e841262f"; | ||
45 | }; | ||
46 | |||
47 | phases = [ "unpackPhase" "installPhase" ]; | ||
48 | |||
49 | installPhase = '' | ||
50 | cp -a . $out | ||
51 | mkdir -p $out/vars | ||
52 | mv $out/{cache,files,store,config.php} $out/vars | ||
53 | ln -s ${varDir}/{cache,files,store,config.php} $out/ | ||
54 | echo -e "core:\n allow_install_dir: true" >> $out/config/production/config.yml | ||
55 | ''; | ||
56 | |||
57 | passthru = toPassthru phpBB; | ||
58 | }; | ||
59 | in | ||
60 | phpBB | ||
diff --git a/pkgs/webapps/phpbb/extensions/adduser.nix b/pkgs/webapps/phpbb/extensions/adduser.nix new file mode 100644 index 0000000..f9073e6 --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/adduser.nix | |||
@@ -0,0 +1,22 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/extensions/autosubscribe.nix b/pkgs/webapps/phpbb/extensions/autosubscribe.nix new file mode 100644 index 0000000..78e23fc --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/autosubscribe.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/extensions/mailinglist.nix b/pkgs/webapps/phpbb/extensions/mailinglist.nix new file mode 100644 index 0000000..d432aaf --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/mailinglist.nix | |||
@@ -0,0 +1,18 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/extensions/markdown.nix b/pkgs/webapps/phpbb/extensions/markdown.nix new file mode 100644 index 0000000..3bd73c7 --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/markdown.nix | |||
@@ -0,0 +1,20 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/extensions/mchat.nix b/pkgs/webapps/phpbb/extensions/mchat.nix new file mode 100644 index 0000000..93ea861 --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/mchat.nix | |||
@@ -0,0 +1,21 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/extensions/monitoranswers.nix b/pkgs/webapps/phpbb/extensions/monitoranswers.nix new file mode 100644 index 0000000..52c852e --- /dev/null +++ b/pkgs/webapps/phpbb/extensions/monitoranswers.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { stdenv, fetchurl, unzip }: | ||
2 | stdenv.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/pkgs/webapps/phpbb/langs/fr.nix b/pkgs/webapps/phpbb/langs/fr.nix new file mode 100644 index 0000000..12f2df0 --- /dev/null +++ b/pkgs/webapps/phpbb/langs/fr.nix | |||
@@ -0,0 +1,12 @@ | |||
1 | { stdenv, fetchurl }: | ||
2 | stdenv.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 | } | ||