2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, util-linux }:
|
2014-09-15 11:55:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-05 15:02:27 +01:00
|
|
|
pname = "pam_mount";
|
|
|
|
version = "2.16";
|
2014-09-15 11:55:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-11-05 15:02:27 +01:00
|
|
|
url = "mirror://sourceforge/pam-mount/pam_mount/${version}/${pname}-${version}.tar.xz";
|
2018-02-27 18:25:11 +01:00
|
|
|
sha256 = "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf";
|
2014-09-15 11:55:23 +02:00
|
|
|
};
|
|
|
|
|
2020-11-05 15:02:27 +01:00
|
|
|
patches = [
|
|
|
|
./insert_utillinux_path_hooks.patch
|
|
|
|
./support_luks2.patch
|
|
|
|
];
|
2014-09-15 11:55:23 +02:00
|
|
|
|
2020-11-05 15:02:27 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/mtcrypt.c \
|
2020-11-24 16:29:28 +01:00
|
|
|
--replace @@NIX_UTILLINUX@@ ${util-linux}/bin
|
2020-11-05 15:02:27 +01:00
|
|
|
'';
|
2015-07-04 16:30:24 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
|
2014-09-15 11:55:23 +02:00
|
|
|
|
2020-11-24 16:29:28 +01:00
|
|
|
buildInputs = [ pam libHX util-linux libxml2 pcre perl openssl cryptsetup ];
|
2020-11-05 15:02:27 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--prefix=${placeholder "out"}"
|
|
|
|
"--localstatedir=${placeholder "out"}/var"
|
|
|
|
"--sbindir=${placeholder "out"}/bin"
|
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"--with-slibdir=${placeholder "out"}/lib"
|
|
|
|
"--with-ssbindir=${placeholder "out"}/bin"
|
|
|
|
];
|
2014-09-15 11:55:23 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-11-05 15:02:27 +01:00
|
|
|
rm -r $out/var
|
|
|
|
'';
|
2014-09-15 11:55:23 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-09-15 12:30:19 +02:00
|
|
|
description = "PAM module to mount volumes for a user session";
|
2020-11-05 15:02:27 +01:00
|
|
|
homepage = "https://pam-mount.sourceforge.net/";
|
2018-08-30 21:42:32 +02:00
|
|
|
license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
|
2020-11-05 15:02:27 +01:00
|
|
|
maintainers = with maintainers; [ tstrobel ];
|
2018-08-30 21:42:32 +02:00
|
|
|
platforms = platforms.linux;
|
2014-09-15 11:55:23 +02:00
|
|
|
};
|
|
|
|
}
|