summary refs log tree commit diff
path: root/pkgs/servers/xmpp/openfire/3.5.2.nix
blob: 23f6f348a11b7d33ac9ce98082c49b754b7f434b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
args : with args; with builderDefs;
  let localDefs = builderDefs.passthru.function (rec {
    src = /* put a fetchurl here */
    fetchurl {
      url = http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_5_2.tar.gz;
      sha256 = "13xzwl8kc8i8xgdv7fpwgkj1wjhzagx4b03fkkj2hcfgdkp1978q";
    };

    buildInputs = [jre];
    configureFlags = [];

    installPhase = FullDepEntry (''
      sed -e 's@\(common_jvm_locations\)=.*@\1${jre}@' -i bin/openfire
      cp -r . $out
      rm -r $out/logs
      mv $out/conf $out/conf.inst
      ln -s /var/log/openfire $out/logs
      ln -s /etc/openfire $out/conf
    '') 
    ["minInit" "doUnpack" "addInputs"];
  });
  in with localDefs;
stdenv.mkDerivation rec {
  name = "openfire-"+version;
  builder = writeScript (name + "-builder")
    (textClosure localDefs 
      [ installPhase doForceShare doPropagate]);
  meta = {
    description = "
    XMPP server in Java.
";
		inherit src;
  };
}