nixos/programs.mosh: refactor
Adds programs.mosh.withUtempter (default: true). The option enables -with-utempter for mosh, allowing it to write to /var/run/utmp and thus making connected sessions appear in the output of `who -a`. For that, a guid-wrapper is required. Also, the path to the `utempter` was hardcoded in the resulting binary until now (so it could never been found), thus, libutempter was patched accordingly to point to /run/wrappers/bin/utempter which at least works when the wrapper is configured.
This commit is contained in:
@@ -13,11 +13,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ glib ];
|
||||
|
||||
patches = [ ./exec_path.patch ];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace Makefile --replace 2711 0711
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
makeFlags = [
|
||||
"libdir=\${out}/lib"
|
||||
"libexecdir=\${out}/lib"
|
||||
"includedir=\${out}/include"
|
||||
@@ -26,6 +28,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
|
||||
longDescription = ''
|
||||
The bundled utempter binary must be able to run as a user belonging to group utmp.
|
||||
On NixOS systems, this can be achieved by creating a setguid wrapper.
|
||||
'';
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.msteen ];
|
||||
|
||||
Reference in New Issue
Block a user