1 { stdenv, fetchurl, callPackage
2 , varDir ? "/var/lib/phpbb"
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 {};
14 fr = callPackage ./langs/fr.nix {};
17 inherit allLangs allExts;
18 withLangs = withLangs pkg;
19 withExts = withExts pkg;
21 withExts = pkg: toExts:
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;
30 withLangs = pkg: toLangs:
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;
39 phpBB = stdenv.mkDerivation rec {
44 url = "https://download.phpbb.com/pub/release/3.3/${version}/${pname}-${version}.tar.bz2";
45 sha256 = "a6234ac9dcf9086c025ece29a0a235f997a92bb9a994eff0ddcf8917e841262f";
48 phases = [ "unpackPhase" "installPhase" ];
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
58 passthru = toPassthru phpBB;