@@ -0,0 +1,33 @@
1+{ stdenv, xlibs, fetchgit, libXScrnSaver, libX11 }:
2+
3+stdenv.mkDerivation {
4+ name = "x11idle-unstable-2017-07-01";
5+
6+ src = fetchgit {
7+ url = "git://orgmode.org/org-mode.git";
8+ rev = "fbd865941f3105f689f78bf053bb3b353b9b8a23";
9+ sha256 = "0ma3m48f4s38xln0gl1ww9i5x28ij0ipxc94kx5h2931zy7lqzvz";
10+ };
11+
12+ buildInputs = [ libXScrnSaver libX11 ];
13+
14+ unpackPhase = ":";
15+
16+ installPhase = ''
17+ mkdir -p $out/bin
18+ gcc -lXss -lX11 $src/contrib/scripts/x11idle.c -o $out/bin/x11idle
19+ '';
20+
21+ meta = with stdenv.lib; {
22+ description = ''
23+ Compute consecutive idle time for current X11 session with millisecond resolution
24+ '';
25+ longDescription = ''
26+ Idle time passes when the user does not act, i.e. when the user doesn't move the mouse or use the keyboard.
27+ '';
28+ homepage = "http://orgmode.org/";
29+ license = licenses.gpl3;
30+ platforms = platforms.linux;
31+ maintainers = [ maintainers.swflint ];
32+ };
33+}