talloc, tdb: fix cross-compilation after wafHook improvements

This commit is contained in:
Symphorien Gibol 2019-03-28 20:15:55 +01:00
parent 3d60a00c63
commit cbd9409086
2 changed files with 12 additions and 19 deletions

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, python, pkgconfig, readline, libxslt
, docbook_xsl, docbook_xml_dtd_42, fixDarwinDylibNames
, buildPackages
, wafHook
}:
stdenv.mkDerivation rec {
@ -11,23 +11,22 @@ stdenv.mkDerivation rec {
sha256 = "1kk76dyav41ip7ddbbf04yfydb4jvywzi2ps0z2vla56aqkn11di";
};
nativeBuildInputs = [ pkgconfig fixDarwinDylibNames python
nativeBuildInputs = [ pkgconfig fixDarwinDylibNames python wafHook
docbook_xsl docbook_xml_dtd_42 ];
buildInputs = [ readline libxslt ];
prePatch = ''
patchShebangs buildtools/bin/waf
'';
wafPath = "buildtools/bin/waf";
configureFlags = [
"--enable-talloc-compat1"
"--bundled-libraries=NONE"
"--builtin-libraries=replace"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-compile"
"--cross-execute=${stdenv.hostPlatform.emulator buildPackages}"
];
configurePlatforms = [];
# this must not be exported before the ConfigurePhase otherwise waf whines
preBuild = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
export NIX_CFLAGS_LINK="-no-pie -shared";
'';
postInstall = ''
${stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc_[0-9]*.o

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, python2, pkgconfig, readline, libxslt
, docbook_xsl, docbook_xml_dtd_42, buildPackages
{ stdenv, fetchurl, wafHook, pkgconfig, readline, libxslt
, docbook_xsl, docbook_xml_dtd_42
}:
stdenv.mkDerivation rec {
@ -10,23 +10,17 @@ stdenv.mkDerivation rec {
sha256 = "1ibcz466xwk1x6xvzlgzd5va4lyrjzm3rnjak29kkwk7cmhw4gva";
};
nativeBuildInputs = [ pkgconfig python2 ];
nativeBuildInputs = [ pkgconfig wafHook ];
buildInputs = [
readline libxslt docbook_xsl docbook_xml_dtd_42
];
preConfigure = ''
patchShebangs buildtools/bin/waf
'';
wafPath = "buildtools/bin/waf";
configureFlags = [
"--bundled-libraries=NONE"
"--builtin-libraries=replace"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-compile"
"--cross-execute=${stdenv.hostPlatform.emulator buildPackages}"
];
configurePlatforms = [ ];
meta = with stdenv.lib; {
description = "The trivial database";