1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

2020-11-24 15:29:28 +00:00
{ stdenv, fetchurl, autoreconfHook, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, util-linux }:
stdenv.mkDerivation rec {
2020-11-05 14:02:27 +00:00
pname = "pam_mount";
version = "2.16";
src = fetchurl {
2020-11-05 14:02:27 +00:00
url = "mirror://sourceforge/pam-mount/pam_mount/${version}/${pname}-${version}.tar.xz";
sha256 = "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf";
};
2020-11-05 14:02:27 +00:00
patches = [
./insert_utillinux_path_hooks.patch
./support_luks2.patch
];
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 15:30:24 +01:00
2020-11-05 14:02:27 +00:00
nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
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"
"--with-ssbindir=${placeholder "out"}/bin"
];
postInstall = ''
2020-11-05 14:02:27 +00:00
rm -r $out/var
'';
2018-08-30 20:42:32 +01:00
meta = with stdenv.lib; {
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 20:42:32 +01:00
license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
2020-11-05 14:02:27 +00:00
maintainers = with maintainers; [ tstrobel ];
2018-08-30 20:42:32 +01:00
platforms = platforms.linux;
};
}