4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, autoreconfHook, pkgconfig, 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 pkgconfig ];
|
|
|
|
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;
|
|
};
|
|
}
|