about summary refs log tree commit diff
path: root/pkgs/applications/networking/sync
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2015-09-21 15:55:17 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2015-10-22 20:52:08 +0200
commitedd64c1d99d056e2c4ca1e86bf89457cb2a24e5d (patch)
treebedccbefa6ee84ea1c9e96be91bd2c7a1c2f77b0 /pkgs/applications/networking/sync
parent1e5415dbc5ca12c679dcf635b58e88a3e0522248 (diff)
lsyncd: init at 2.1.5
Diffstat (limited to 'pkgs/applications/networking/sync')
-rw-r--r--pkgs/applications/networking/sync/lsyncd/configure-a2x-fix.patch18
-rw-r--r--pkgs/applications/networking/sync/lsyncd/default.nix40
2 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/networking/sync/lsyncd/configure-a2x-fix.patch b/pkgs/applications/networking/sync/lsyncd/configure-a2x-fix.patch
new file mode 100644
index 0000000000000..73b4799469184
--- /dev/null
+++ b/pkgs/applications/networking/sync/lsyncd/configure-a2x-fix.patch
@@ -0,0 +1,18 @@
+diff -aur lsyncd-release-2.1.5.orig/configure.ac lsyncd-release-2.1.5/configure.ac
+--- lsyncd-release-2.1.5.orig/configure.ac	2013-06-07 18:24:02.000000000 +0600
++++ lsyncd-release-2.1.5/configure.ac	2014-03-04 13:24:15.390350812 +0600
+@@ -15,10 +15,10 @@
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+ 
+-#AC_PATH_PROG([A2X], [a2x], [no])
+-#if test x${A2X} = xno ; then
+-#	AC_MSG_ERROR([Program 'a2x' (package asciidoc) is required])
+-#fi
++AC_PATH_PROG([A2X], [a2x], [no])
++if test x${A2X} = xno ; then
++	AC_MSG_ERROR([Program 'a2x' (package asciidoc) is required])
++fi
+ 
+ ###
+ # Checks for Lua
\ No newline at end of file
diff --git a/pkgs/applications/networking/sync/lsyncd/default.nix b/pkgs/applications/networking/sync/lsyncd/default.nix
new file mode 100644
index 0000000000000..775da905ea915
--- /dev/null
+++ b/pkgs/applications/networking/sync/lsyncd/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, automake, autoconf, lua, pkgconfig, rsync,
+  asciidoc, libxml2, docbook_xml_dtd_45, docbook_xml_xslt, libxslt }:
+
+stdenv.mkDerivation rec {
+  name = "lsyncd-${version}";
+  version = "2.1.5";
+
+  src = fetchFromGitHub {
+    owner = "axkibe";
+    repo = "lsyncd";
+    rev = "release-${version}";
+    sha256 = "0jvr2rv34jyjrv7188vdv1z8vgvm4wydqwsp9x5ksfzh9drbq5gn";
+  };
+
+  patches = [ ./configure-a2x-fix.patch ];
+
+  preConfigurePhase = ''
+    substituteInPlace default-rsync.lua \
+      --replace "binary        = '/usr/bin/rsync'," "binary        = '${rsync}/bin/rsync',"
+  '';
+
+  configurePhase = ''
+    ./autogen.sh --prefix=$out
+    ./configure --prefix=$out
+  '';
+
+  buildInputs = [
+    rsync
+    automake autoconf lua pkgconfig
+    asciidoc libxml2 docbook_xml_dtd_45 docbook_xml_xslt libxslt
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/axkibe/lsyncd;
+    description = "A utility that synchronizes local directories with remote targets";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ bobvanderlinden ];
+  };
+}