git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitfb876141d3248b44e1245896b027178944e954aa authorMichael Roitzsch <reactorcontrol@icloud.com> dateSun 17 Jan 2021, 15:35 (6 years ago) parent57c1982
1 file changed+3−2
pkgs/os-specific/linux/pam/default.nix+3−2
pkgs/os-specific/linux/pam/default.nix+3−2
@@ -1,4 +1,4 @@
1−{ lib, stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4
1+{ lib, stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4, gettext
22, nixosTests
33}:
44
@@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
2828 outputs = [ "out" "doc" "man" /* "modules" */ ];
2929
3030 depsBuildBuild = [ buildPackages.stdenv.cc ];
31− nativeBuildInputs = [ flex ];
31+ nativeBuildInputs = [ flex ]
32+ ++ lib.optional stdenv.buildPlatform.isDarwin gettext;
3233
3334 buildInputs = [ cracklib db4 ];
3435