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