2018-08-26 00:08:24 +02:00
|
|
|
{ stdenv, fetchurl, bash }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "incron-0.5.12";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ar-/incron/archive/0.5.12.tar.gz";
|
|
|
|
sha256 = "14cgsfyl43pd86wy40m1xwr7ww023n2jyks66ngybz5s4gbhps6c";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile
|
|
|
|
sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
|
2018-08-26 03:02:33 +02:00
|
|
|
sed -i "s|/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin|/run/current-system/sw/bin|g" usertable.cpp
|
2018-08-26 00:08:24 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
# make install doesn't work because setuid and permissions
|
|
|
|
# just manually install the binaries instead
|
|
|
|
cp incrond incrontab $out/bin/
|
|
|
|
|
|
|
|
# make install-man is fine for documentation
|
|
|
|
make install-man
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "
|
|
|
|
The inotify cron daemon (incrond) is a daemon which monitors filesystem events and executes commands defined in system and user tables. It's use is generally similar to cron.";
|
2018-08-26 02:51:39 +02:00
|
|
|
license = licenses.gpl2;
|
2018-08-26 00:08:24 +02:00
|
|
|
homepage = https://github.com/ar-/incron;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|