linux-pam: Optionally build with libxcrypt

This enables support for new password hashing functions in PAM.

A part of #112371.
This commit is contained in:
Misha Gusarov 2021-02-28 16:48:56 +00:00
parent 8ea1ce7592
commit e3dd2def91

View File

@ -1,5 +1,6 @@
{ lib, stdenv, buildPackages, fetchurl, flex, cracklib, db4, gettext { lib, stdenv, buildPackages, fetchurl, flex, cracklib, db4, gettext
, nixosTests , nixosTests
, withLibxcrypt ? false, libxcrypt
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -17,7 +18,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ flex ] nativeBuildInputs = [ flex ]
++ lib.optional stdenv.buildPlatform.isDarwin gettext; ++ lib.optional stdenv.buildPlatform.isDarwin gettext;
buildInputs = [ cracklib db4 ]; buildInputs = [ cracklib db4 ]
++ lib.optional withLibxcrypt libxcrypt;
enableParallelBuilding = true; enableParallelBuilding = true;