2024-09-19 14:19:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bash, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-22 07:53:02 +00:00
|
|
|
pname = "incron";
|
|
|
|
version = "0.5.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ar-";
|
|
|
|
repo = "incron";
|
2021-08-22 07:53:02 +00:00
|
|
|
rev = "${pname}-${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./default_path.patch ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
installTargets = [ "install-man" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
# make install doesn't work because setuid and permissions
|
|
|
|
# just manually install the binaries instead
|
|
|
|
cp incrond incrontab $out/bin/
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) incron; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Cron-like daemon which handles filesystem events";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ar-/incron";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.aanderse ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|