From edd64c1d99d056e2c4ca1e86bf89457cb2a24e5d Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Mon, 21 Sep 2015 15:55:17 +0200 Subject: [PATCH] lsyncd: init at 2.1.5 --- .../sync/lsyncd/configure-a2x-fix.patch | 18 +++++++++ .../networking/sync/lsyncd/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 62 insertions(+) create mode 100644 pkgs/applications/networking/sync/lsyncd/configure-a2x-fix.patch create mode 100644 pkgs/applications/networking/sync/lsyncd/default.nix 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 00000000000..73b47994691 --- /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 00000000000..775da905ea9 --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e9768fe4eb8..d90add78a5e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2003,6 +2003,10 @@ let lsdvd = callPackage ../tools/cd-dvd/lsdvd {}; + lsyncd = callPackage ../applications/networking/sync/lsyncd { + lua = lua5_2_compat; + }; + kippo = callPackage ../servers/kippo { }; klavaro = callPackage ../games/klavaro {};