2015-07-04 15:30:24 +01:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, utillinux }:
|
2014-09-15 10:55:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-02-27 17:25:11 +00:00
|
|
|
name = "pam_mount-2.16";
|
2014-09-15 10:55:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-02-27 17:25:11 +00:00
|
|
|
url = "mirror://sourceforge/pam-mount/pam_mount/2.16/${name}.tar.xz";
|
|
|
|
sha256 = "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf";
|
2014-09-15 10:55:23 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ autoconf automake libtool pam libHX utillinux libxml2 pcre perl openssl cryptsetup ];
|
2014-09-15 10:55:23 +01:00
|
|
|
|
2015-07-04 15:30:24 +01:00
|
|
|
patches = [ ./insert_utillinux_path_hooks.patch ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace src/mtcrypt.c --replace @@NIX_UTILLINUX@@ ${utillinux}/bin
|
|
|
|
sh autogen.sh --prefix=$out
|
|
|
|
'';
|
2014-09-15 10:55:23 +01:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
2014-09-15 10:55:23 +01:00
|
|
|
|
|
|
|
# Probably a hack, but using DESTDIR and PREFIX makes everything work!
|
|
|
|
postInstall = ''
|
2015-07-04 15:30:24 +01:00
|
|
|
mkdir -p $out
|
2014-09-15 10:55:23 +01:00
|
|
|
cp -r $out/$out/* $out
|
|
|
|
rm -r $out/nix
|
|
|
|
'';
|
|
|
|
|
2018-08-30 20:42:32 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-09-15 10:55:23 +01:00
|
|
|
homepage = http://pam-mount.sourceforge.net/;
|
2014-09-15 11:30:19 +01:00
|
|
|
description = "PAM module to mount volumes for a user session";
|
2018-08-30 20:42:32 +01:00
|
|
|
maintainers = [ maintainers.tstrobel ];
|
|
|
|
license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-15 10:55:23 +01:00
|
|
|
};
|
|
|
|
}
|