depot/third_party/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix
Default email c6ca5b8f13 Project import generated by Copybara.
GitOrigin-RevId: e4d49de45a3b5dbcb881656b4e3986e666141ea9
2022-07-18 18:21:45 +02:00

46 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libtool, pam, libHX, libxml2, pcre2, perl, openssl, cryptsetup, util-linux }:
stdenv.mkDerivation rec {
pname = "pam_mount";
version = "2.19";
src = fetchurl {
url = "mirror://sourceforge/pam-mount/pam_mount/${pname}-${version}.tar.xz";
sha256 = "02m6w04xhgv2yx69yxph8giw0sp39s9lvvlffslyna46fnr64qvb";
};
patches = [
./insert_utillinux_path_hooks.patch
];
postPatch = ''
substituteInPlace src/mtcrypt.c \
--replace @@NIX_UTILLINUX@@ ${util-linux}/bin
'';
nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
buildInputs = [ pam libHX util-linux libxml2 pcre2 perl openssl cryptsetup ];
enableParallelBuilding = true;
configureFlags = [
"--prefix=${placeholder "out"}"
"--localstatedir=${placeholder "out"}/var"
"--sbindir=${placeholder "out"}/bin"
"--sysconfdir=${placeholder "out"}/etc"
"--with-slibdir=${placeholder "out"}/lib"
];
postInstall = ''
rm -r $out/var
'';
meta = with lib; {
description = "PAM module to mount volumes for a user session";
homepage = "https://pam-mount.sourceforge.net/";
license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ];
maintainers = with maintainers; [ netali ];
platforms = platforms.linux;
};
}