2022-07-18 16:21:45 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libtool, pam, libHX, libxml2, pcre2, perl, openssl, cryptsetup, util-linux }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-06 00:33:48 +00:00
|
|
|
pname = "pam_mount";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://inai.de/files/pam_mount/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-VCYgekhWgPjhdkukBbs4w5pODIMGvIJxkQ8bgZozbO0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
patches = [
|
|
|
|
./insert_utillinux_path_hooks.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/mtcrypt.c \
|
2020-11-24 20:58:05 +00:00
|
|
|
--replace @@NIX_UTILLINUX@@ ${util-linux}/bin
|
2020-11-06 00:33:48 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
libtool
|
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildInputs = [
|
|
|
|
cryptsetup
|
|
|
|
libHX
|
|
|
|
libxml2
|
|
|
|
openssl
|
|
|
|
pam
|
|
|
|
pcre2
|
|
|
|
util-linux
|
|
|
|
];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--prefix=${placeholder "out"}"
|
|
|
|
"--localstatedir=${placeholder "out"}/var"
|
|
|
|
"--sbindir=${placeholder "out"}/bin"
|
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"--with-slibdir=${placeholder "out"}/lib"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-11-06 00:33:48 +00:00
|
|
|
rm -r $out/var
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "PAM module to mount volumes for a user session";
|
2020-11-06 00:33:48 +00:00
|
|
|
homepage = "https://pam-mount.sourceforge.net/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
|
2022-07-18 16:21:45 +00:00
|
|
|
maintainers = with maintainers; [ netali ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|