nixpkgs/pkgs/by-name/pa/pam_mount/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

60 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.20";
src = fetchurl {
url = "https://inai.de/files/pam_mount/${pname}-${version}.tar.xz";
hash = "sha256-VCYgekhWgPjhdkukBbs4w5pODIMGvIJxkQ8bgZozbO0=";
};
patches = [
./insert_utillinux_path_hooks.patch
];
postPatch = ''
substituteInPlace src/mtcrypt.c \
--replace @@NIX_UTILLINUX@@ ${util-linux}/bin
'';
nativeBuildInputs = [
autoreconfHook
libtool
perl
pkg-config
];
buildInputs = [
cryptsetup
libHX
libxml2
openssl
pam
pcre2
util-linux
];
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; [ gpl2Plus gpl3 lgpl21 lgpl3 ];
maintainers = with maintainers; [ netali ];
platforms = platforms.linux;
};
}