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