forked from mirrors/nixpkgs
libcap: Fix cross-compilation
This commit is contained in:
parent
c8d03e6298
commit
db9f302cf3
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue