1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

49 lines
1.4 KiB
Nix

{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, util-linux }:
stdenv.mkDerivation rec {
pname = "pam_mount";
version = "2.16";
src = fetchurl {
url = "mirror://sourceforge/pam-mount/pam_mount/${version}/${pname}-${version}.tar.xz";
sha256 = "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf";
};
patches = [
./insert_utillinux_path_hooks.patch
./support_luks2.patch
];
postPatch = ''
substituteInPlace src/mtcrypt.c \
--replace @@NIX_UTILLINUX@@ ${util-linux}/bin
'';
nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
buildInputs = [ pam libHX util-linux libxml2 pcre 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"
"--with-ssbindir=${placeholder "out"}/bin"
];
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; [ tstrobel ];
platforms = platforms.linux;
};
}