linux-pam: fix cross compilation on Darwin

A build-time tool is created, which requires libintl.h.
On Linux, libintl.h comes with glibc, but on Darwin, gettext is needed.
This commit is contained in:
Michael Roitzsch 2021-01-17 15:35:34 +01:00
parent 57c198236a
commit fb876141d3

View file

@ -1,4 +1,4 @@
{ lib, stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4
{ lib, stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4, gettext
, nixosTests
}:
@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "doc" "man" /* "modules" */ ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ flex ];
nativeBuildInputs = [ flex ]
++ lib.optional stdenv.buildPlatform.isDarwin gettext;
buildInputs = [ cracklib db4 ];