2015-07-04 16:30:24 +02:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, utillinux }:
|
2014-09-15 11:55:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-02 16:41:22 +02:00
|
|
|
name = "pam_mount-2.15";
|
2014-09-15 11:55:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-07-02 16:41:22 +02:00
|
|
|
url = "mirror://sourceforge/pam-mount/pam_mount/2.15/${name}.tar.xz";
|
|
|
|
sha256 = "091aq5zyc60wh21m1ryanjwknwxlaj9nvlswn5vjrmcdir5gnkm5";
|
2014-09-15 11:55:23 +02:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ autoconf automake libtool pam libHX utillinux libxml2 pcre perl openssl cryptsetup ];
|
2014-09-15 11:55:23 +02:00
|
|
|
|
2015-07-04 16:30:24 +02: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 11:55:23 +02:00
|
|
|
|
|
|
|
makeFlags = "DESTDIR=$(out)";
|
|
|
|
|
|
|
|
# Probably a hack, but using DESTDIR and PREFIX makes everything work!
|
|
|
|
postInstall = ''
|
2015-07-04 16:30:24 +02:00
|
|
|
mkdir -p $out
|
2014-09-15 11:55:23 +02:00
|
|
|
cp -r $out/$out/* $out
|
|
|
|
rm -r $out/nix
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://pam-mount.sourceforge.net/;
|
2014-09-15 12:30:19 +02:00
|
|
|
description = "PAM module to mount volumes for a user session";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.tstrobel ];
|
2014-09-15 11:55:23 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|