Unverified Commit ef539d10 authored by chillcicada's avatar chillcicada
Browse files

pam_mount: 2.20 -> 2.22; add me as maintainers

parent d0df291f
Loading
Loading
Loading
Loading
+19 −15
Original line number Diff line number Diff line
{
  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;
  };
}
})
+24 −0
Original line number Diff line number Diff line
From 64dfcc87ccb6f7b0243b206524f7ea9aa9c59bc8 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
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)