nixpkgs/pkgs/by-name/li/libutempter/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.1 KiB
Nix

{ stdenv, fetchurl, lib, glib }:
stdenv.mkDerivation rec {
pname = "libutempter";
version = "1.2.1";
src = fetchurl {
url = "http://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-${version}.tar.gz";
sha256 = "sha256-ln/vNy85HeUBhDrYdXDGz12r2WUfAPF4MJD7wSsqNMs=";
};
buildInputs = [ glib ];
patches = [ ./exec_path.patch ];
patchFlags = [ "-p2" ];
prePatch = ''
substituteInPlace Makefile --replace 2711 0711
'';
makeFlags = [
"libdir=\${out}/lib"
"libexecdir=\${out}/lib"
"includedir=\${out}/include"
"mandir=\${out}/share/man"
];
meta = with lib; {
homepage = "https://github.com/altlinux/libutempter";
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 ];
};
}