1{ stdenv, fetchurl, lib, glib }:
2
3with lib;
4
5stdenv.mkDerivation rec {
6 name = "libutempter-${version}";
7 version = "1.1.6";
8
9 src = fetchurl {
10 url = "http://archive.ubuntu.com/ubuntu/pool/main/libu/libutempter/libutempter_${version}.orig.tar.bz2";
11 sha256 = "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q";
12 };
13
14 buildInputs = [ glib ];
15
16 patches = [ ./exec_path.patch ];
17
18 prePatch = ''
19 substituteInPlace Makefile --replace 2711 0711
20 '';
21
22 makeFlags = [
23 "libdir=\${out}/lib"
24 "libexecdir=\${out}/lib"
25 "includedir=\${out}/include"
26 "mandir=\${out}/share/man"
27 ];
28
29 meta = {
30 description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
31 longDescription = ''
32 The bundled utempter binary must be able to run as a user belonging to group utmp.
33 On NixOS systems, this can be achieved by creating a setguid wrapper.
34 '';
35 license = licenses.lgpl21Plus;
36 platforms = platforms.linux;
37 maintainers = [ maintainers.msteen ];
38 };
39}