Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, bash }:
2
3stdenv.mkDerivation rec {
4 pname = "incron";
5 version = "0.5.12";
6 src = fetchFromGitHub {
7 owner = "ar-";
8 repo = "incron";
9 rev = "${pname}-${version}";
10 sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
11 };
12
13 patches = [ ./default_path.patch ];
14
15 prePatch = ''
16 sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
17 '';
18
19 installFlags = [ "PREFIX=$(out)" ];
20 installTargets = [ "install-man" ];
21
22 preInstall = ''
23 mkdir -p $out/bin
24
25 # make install doesn't work because setuid and permissions
26 # just manually install the binaries instead
27 cp incrond incrontab $out/bin/
28 '';
29
30 meta = with lib; {
31 description = "A cron-like daemon which handles filesystem events";
32 homepage = "https://github.com/ar-/incron";
33 license = licenses.gpl2;
34 maintainers = [ maintainers.aanderse ];
35 platforms = platforms.linux;
36 };
37}