3
0
Fork 0
forked from mirrors/nixpkgs

libcap: Fix cross-compilation

This commit is contained in:
Ben Gamari 2017-10-17 16:38:10 -04:00 committed by Will Dietz
parent c8d03e6298
commit db9f302cf3

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, attr, perl, pam ? null }:
{ stdenv, buildPackages, fetchurl, attr, perl, pam ? null }:
assert pam != null -> stdenv.isLinux;
stdenv.mkDerivation rec {
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "lib" "man" "doc" ]
++ stdenv.lib.optional (pam != null) "pam";
nativeBuildInputs = [ perl ];
nativeBuildInputs = [ perl buildPackages.stdenv.cc ];
buildInputs = [ pam ];
@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
makeFlags = [
"lib=lib"
(stdenv.lib.optional (pam != null) "PAM_CAP=yes")
"BUILD_CC=${buildPackages.stdenv.cc.targetPrefix}gcc"
"CC=${stdenv.cc.targetPrefix}gcc"
];
prePatch = ''