(define-module (gnu packages ejabberd) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages erlang) #:use-module (gnu packages web) #:use-module (gnu packages imagemagick) #:use-module (gnu packages gd) #:use-module (gnu packages openldap) #:use-module (gnu packages databases) #:use-module (gnu packages xml) #:use-module (gnu packages compression) #:use-module (gnu packages tls) #:use-module (gnu packages autotools) #:use-module (gnu packages perl) #:use-module (gnu packages version-control) #:use-module ((guix licenses) #:prefix license:) ) ; NOTE: we use rebar 2.x version bundled with ejabberd to build ejabberd deps (define-public erlang-rebar2-bin (package (name "erlang-rebar2-bin") (version "2.6.4-ejabberd") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/processone/ejabberd") (commit "21.01"))) (sha256 (base32 "0fyxfwgqw72i4nz5g5nw79h6d4f6kw5r2mzh7c2s3npv7kx4zvry")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (delete 'build) (delete 'check) (delete 'bootstrap) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) (install-file "rebar" bin) ) #t) ) ))) (native-inputs `( ("erlang" ,erlang) )) (license license:asl2.0) (synopsis "rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.") (description "rebar is a self-contained Erlang script, so it's easy to distribute or even embed directly in a project. Where possible, rebar uses standard Erlang/OTP conventions for project structures, thus minimizing the amount of build configuration work. rebar also provides dependency management, enabling application writers to easily re-use common libraries from a variety of locations (git, hg, etc).") (home-page "https://github.com/rebar/rebar") )) (define-public erlang-base64url (package (name "erelang-base64url") (version "1.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dvv/base64url") (commit version))) (sha256 (base32 "0467cydxlx1fww1rmn2hjiyhwyszvrngc4x9mg3dkihr7jc5hsaa")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib/base64url-" ,version "/ebin"))) (copy-recursively "ebin" lib) ) #t) ) ))) (native-inputs `( ("erlang" ,erlang) ("erlang-rebar2" ,erlang-rebar2-bin) )) (synopsis "Standalone URL safe base64-compatible codec.") (description "Standalone URL safe base64-compatible codec.") (license (list license:bsd-4 )) (home-page "https://github.com/dvv/base64url") )) (define-public ejabberd (package (name "ejabberd") (version "21.01") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/processone/ejabberd") (commit version))) (sha256 (base32 "0fyxfwgqw72i4nz5g5nw79h6d4f6kw5r2mzh7c2s3npv7kx4zvry")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'fix-bin/sh (lambda _ (substitute* "configure" (("#!/bin/sh") (string-append "#!" (which "sh"))) ((" = /bin/sh") (string-append " = " (which "sh"))) ) ) ) ) #:configure-flags (list "--enable-stun" "--enable-system-deps" "--enable-mysql" "--enable-odbc" "--enable-pgsql" "--enable-zlib" ) ) ) (native-inputs `( ("erlang" ,erlang) ("autoconf" ,autoconf) ("automake" ,automake) ("perl" ,perl) ("git" ,git) )) (inputs `( ("erlang" ,erlang) ("erlang-base64url" ,erlang-base64url) ("expat" ,expat ) ("libyaml" ,libyaml) ("zlib" ,zlib) ("imagemagick" ,imagemagick) ("gd" ,gd) ("openldap" ,openldap) ("unixodbc" ,unixodbc) ("openssl" ,openssl) )) (synopsis "A scalable and reliable platform for instant messaging") (description "ejabberd is a distributed, fault-tolerant technology that allows the creation of large-scale instant messaging applications. The server can reliably support thousands of simultaneous users on a single node and has been designed to provide exceptional standards of fault tolerance. As an open source technology, based on industry-standards, ejabberd can be used to build bespoke solutions very cost effectively") (license (list license:gpl2 )) (home-page "https://www.ejabberd.im") )) ejabberd