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