From 8a5b24082d2fb05c54bdd2d1eca962d3cc3fde32 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sun, 19 Oct 2025 14:39:42 +0200 Subject: [PATCH] account-utils: init at 1.3.0 --- pkgs/by-name/ac/account-utils/package.nix | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pkgs/by-name/ac/account-utils/package.nix diff --git a/pkgs/by-name/ac/account-utils/package.nix b/pkgs/by-name/ac/account-utils/package.nix new file mode 100644 index 000000000000..cd0f3e8ff86e --- /dev/null +++ b/pkgs/by-name/ac/account-utils/package.nix @@ -0,0 +1,72 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + linux-pam, + systemdLibs, + libcap, + libxcrypt, + libeconf, + libselinux, + docbook-xsl-ns, + libxslt, +}: +let + selinuxSupport = lib.meta.availableOn stdenv.hostPlatform libselinux; +in +stdenv.mkDerivation (finalAttrs: { + pname = "account-utils"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "thkukuk"; + repo = "account-utils"; + tag = "v${finalAttrs.version}"; + hash = "sha256-9l+y7FLb0IZXXp4RstlhNR6yA7b4b831obFuiVtO9+k="; + }; + + __structuredAttrs = true; + strictDeps = true; + + nativeBuildInputs = [ + meson + ninja + pkg-config + libxslt + docbook-xsl-ns + ]; + + buildInputs = [ + linux-pam + systemdLibs + libxcrypt + libeconf + libcap + ] + ++ lib.optional selinuxSupport libselinux; + + mesonFlags = [ + (lib.mesonEnable "selinux" selinuxSupport) + (lib.mesonOption "c_args" "-ffat-lto-objects") + ]; + + meta = { + description = "Services, utilities and PAM modules, which allow authentication and account management on systems with the NoNewPrivs flag set (no setuid/setgid binaries)"; + homepage = "https://github.com/thkukuk/account-utils"; + changelog = "https://github.com/thkukuk/account-utils/releases/tag/v${finalAttrs.version}"; + license = + with lib.licenses; + AND [ + gpl2Plus + lgpl21Plus + bsd2 + ]; + maintainers = with lib.maintainers; [ grimmauld ]; + platforms = lib.platforms.linux; + # take precedence over shadow + priority = -1; + }; +})