From ef539d101a79d2cf3f03cec6efd3b3e64d80da2e Mon Sep 17 00:00:00 2001 From: chillcicada <2210227279@qq.com> Date: Sun, 14 Dec 2025 14:56:55 +0800 Subject: [PATCH] pam_mount: 2.20 -> 2.22; add me as maintainers --- pkgs/by-name/pa/pam_mount/package.nix | 34 +++++++++++-------- .../resolve_build_failure_with_gcc-13.patch | 24 +++++++++++++ 2 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 pkgs/by-name/pa/pam_mount/resolve_build_failure_with_gcc-13.patch diff --git a/pkgs/by-name/pa/pam_mount/package.nix b/pkgs/by-name/pa/pam_mount/package.nix index fa78fd1e012e..a3c9ff0712db 100644 --- a/pkgs/by-name/pa/pam_mount/package.nix +++ b/pkgs/by-name/pa/pam_mount/package.nix @@ -1,31 +1,35 @@ { lib, stdenv, - fetchurl, + fetchFromGitea, autoreconfHook, + perl, pkg-config, - libtool, pam, libHX, libxml2, pcre2, - perl, openssl, cryptsetup, util-linux, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pam_mount"; - version = "2.20"; + version = "2.22"; - src = fetchurl { - url = "https://inai.de/files/pam_mount/${pname}-${version}.tar.xz"; - hash = "sha256-VCYgekhWgPjhdkukBbs4w5pODIMGvIJxkQ8bgZozbO0="; + src = fetchFromGitea { + domain = "codeberg.org"; + tag = "v${finalAttrs.version}"; + owner = "jengelh"; + repo = "pam_mount"; + hash = "sha256-13vAYIulkOdq0u6xyYgVFmFo31yLmL5Ip79ZTo3Zhn0="; }; patches = [ ./insert_utillinux_path_hooks.patch + ./resolve_build_failure_with_gcc-13.patch ]; postPatch = '' @@ -35,7 +39,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook - libtool perl pkg-config ]; @@ -60,20 +63,21 @@ stdenv.mkDerivation rec { "--with-slibdir=${placeholder "out"}/lib" ]; - postInstall = '' - rm -r $out/var - ''; + passthru.updateScript = nix-update-script { }; meta = { description = "PAM module to mount volumes for a user session"; - homepage = "https://pam-mount.sourceforge.net/"; + homepage = "https://inai.de/projects/pam_mount/"; license = with lib.licenses; [ gpl2Plus gpl3 lgpl21 lgpl3 ]; - maintainers = with lib.maintainers; [ netali ]; + maintainers = with lib.maintainers; [ + netali + chillcicada + ]; platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/pa/pam_mount/resolve_build_failure_with_gcc-13.patch b/pkgs/by-name/pa/pam_mount/resolve_build_failure_with_gcc-13.patch new file mode 100644 index 000000000000..e0b09cff52cc --- /dev/null +++ b/pkgs/by-name/pa/pam_mount/resolve_build_failure_with_gcc-13.patch @@ -0,0 +1,24 @@ +From 64dfcc87ccb6f7b0243b206524f7ea9aa9c59bc8 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 30 Oct 2025 12:22:01 +0100 +Subject: [PATCH] build: resolve build failure with gcc-13 + +nullptr is a C23-ism. +--- + src/pam_mount.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/pam_mount.h b/src/pam_mount.h +index 61395f7..f547d8c 100644 +--- a/src/pam_mount.h ++++ b/src/pam_mount.h +@@ -14,6 +14,9 @@ + #else + # define EXPORT_SYMBOL + #endif ++#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 202300L ++# define nullptr NULL ++#endif + + #define sizeof_z(x) (sizeof(x) - 1) +