boost: Remove dependencies on boost-dev

This commit is contained in:
William A. Kennington III 2014-10-30 14:43:37 -07:00
parent af8654db27
commit 09d970ce12
2 changed files with 17 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames { stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, makeSetupHook
, toolset ? null , toolset ? null
, enableRelease ? true , enableRelease ? true
, enableDebug ? false , enableDebug ? false
@ -89,13 +89,16 @@ let
# Create a derivation which encompasses everything, making buildInputs nicer # Create a derivation which encompasses everything, making buildInputs nicer
mkdir -p $out/nix-support mkdir -p $out/nix-support
echo "$dev $lib" > $out/nix-support/propagated-native-build-inputs echo "${stripHeaderPathHook} $dev $lib" > $out/nix-support/propagated-native-build-inputs
''; '';
commonConfigureFlags = [ commonConfigureFlags = [
"--includedir=$(dev)/include" "--includedir=$(dev)/include"
"--libdir=$(lib)/lib" "--libdir=$(lib)/lib"
]; ];
stripHeaderPathHook = makeSetupHook { } ./strip-header-path.sh;
in in
stdenv.mkDerivation { stdenv.mkDerivation {

View File

@ -0,0 +1,12 @@
postPhases+=" boostHeaderStripPhase"
boostHeaderStripPhase() {
runHook preBoostHeaderStrip
[ -z "$outputs" ] && outputs=out
for output in $outputs; do
eval "path=\$$outputs"
[ -d "$path/bin" ] || continue
find "$path/bin" -type f -exec sed -i "s,[^/]*\(-boost-[0-9.]*-dev\),xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\1,g" {} \;
done
runHook postBoostHeaderStrip
}