From 46c2e619e856ad679ae41005e8ba2a9dac39ff77 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 15 Oct 2017 13:04:42 -0400 Subject: [PATCH] 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) --- pkgs/os-specific/linux/pam/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 3de7916bff6..fc2a7ea61d2 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, flex, cracklib }: +{ stdenv, buildPackages, fetchurl, flex, cracklib }: stdenv.mkDerivation rec { name = "linux-pam-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" "man" /* "modules" */ ]; - nativeBuildInputs = [ flex ]; + nativeBuildInputs = [ buildPackages.stdenv.cc flex ]; buildInputs = [ cracklib ]; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { crossAttrs = { propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ]; preConfigure = preConfigure + '' - ar x ${flex.crossDrv}/lib/libfl.a + $crossConfig-ar x ${flex.crossDrv}/lib/libfl.a mv libyywrap.o libyywrap-target.o ar x ${flex}/lib/libfl.a mv libyywrap.o libyywrap-host.o