linux-pam: Add necessary build dependencies for cross-compilation

Ensure that we use the correct `ar` and add explicit dependency on the build CC.

(cherry picked from commit 5efb768011f6bce870f4ce814295a399d5a89c10)

authored by Ben Gamari and committed by Will Dietz 46c2e619 47540dab

+3 -3
+3 -3
pkgs/os-specific/linux/pam/default.nix
··· 1 - { stdenv, fetchurl, flex, cracklib }: 1 + { stdenv, buildPackages, fetchurl, flex, cracklib }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "linux-pam-${version}"; ··· 11 11 12 12 outputs = [ "out" "doc" "man" /* "modules" */ ]; 13 13 14 - nativeBuildInputs = [ flex ]; 14 + nativeBuildInputs = [ buildPackages.stdenv.cc flex ]; 15 15 16 16 buildInputs = [ cracklib ]; 17 17 ··· 20 20 crossAttrs = { 21 21 propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ]; 22 22 preConfigure = preConfigure + '' 23 - ar x ${flex.crossDrv}/lib/libfl.a 23 + $crossConfig-ar x ${flex.crossDrv}/lib/libfl.a 24 24 mv libyywrap.o libyywrap-target.o 25 25 ar x ${flex}/lib/libfl.a 26 26 mv libyywrap.o libyywrap-host.o