From 644cf259a5d8253dc0ac48917bfec110db652976 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 3 Apr 2009 18:46:26 +0000 Subject: Add GNU mcron, a `cron' implementation in Guile Scheme. svn path=/nixpkgs/trunk/; revision=14870 --- pkgs/tools/system/mcron/default.nix | 30 ++++++++++++++++++++++ .../system/mcron/install-vixie-programs.patch | 22 ++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 pkgs/tools/system/mcron/default.nix create mode 100644 pkgs/tools/system/mcron/install-vixie-programs.patch (limited to 'pkgs/tools/system/mcron') diff --git a/pkgs/tools/system/mcron/default.nix b/pkgs/tools/system/mcron/default.nix new file mode 100644 index 000000000000..3c14d207a560 --- /dev/null +++ b/pkgs/tools/system/mcron/default.nix @@ -0,0 +1,30 @@ +{ fetchurl, stdenv, guile, which, ed }: + +stdenv.mkDerivation rec { + name = "mcron-1.0.4"; + + src = fetchurl { + url = "mirror://gnu/mcron/${name}.tar.gz"; + sha256 = "0wrpi9qj50a8wfslapnkmsr6d3qx40hfw57a022m1z1syiljq4xl"; + }; + + patches = [ ./install-vixie-programs.patch ]; + + buildInputs = [ guile which ed ]; + + meta = { + description = "GNU mcron, a flexible implementation of `cron' in Guile"; + + longDescription = '' + The GNU package mcron (Mellor's cron) is a 100% compatible + replacement for Vixie cron. It is written in pure Guile, and + allows configuration files to be written in scheme (as well as + Vixie's original format) for infinite flexibility in specifying + when jobs should be run. Mcron was written by Dale Mellor. + ''; + + homepage = http://www.gnu.org/software/mcron/; + + license = "GPLv3+"; + }; +} diff --git a/pkgs/tools/system/mcron/install-vixie-programs.patch b/pkgs/tools/system/mcron/install-vixie-programs.patch new file mode 100644 index 000000000000..98cdb6d142c6 --- /dev/null +++ b/pkgs/tools/system/mcron/install-vixie-programs.patch @@ -0,0 +1,22 @@ +This patch allows us to install the Vixie-compatible binaries as +non-root. + +--- mcron-1.0.4/makefile.in 2008-02-21 20:55:24.000000000 +0100 ++++ mcron-1.0.4/makefile.in 2009-04-03 20:18:44.000000000 +0200 +@@ -872,15 +872,11 @@ mcron.c : main.scm crontab.scm makefile. + @rm -f mcron.escaped.scm > /dev/null 2>&1 + + install-exec-hook: +- @if [ "`id -u`" -eq "0" ]; then \ ++ @if true; then \ + rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \ + $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \ + rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \ + $(INSTALL) --mode='u=rwxs,og=rx' mcron$(EXEEXT) $(fpp)crontab$(EXEEXT); \ +- ./mkinstalldirs -m 'u=rwx' /var/cron; \ +- ./mkinstalldirs -m 'u=rwx,og=rx' /var/run; \ +- ./mkinstalldirs -m 'u=rwx,og=rx' @GUILE_SITE@; \ +- ./mkinstalldirs -m 'u=rwx,og=rx' @GUILE_SITE@/mcron; \ + else \ + echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \ + fi -- cgit 1.4.1