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
, enableRelease ? true
, enableDebug ? false
@ -89,13 +89,16 @@ let
# Create a derivation which encompasses everything, making buildInputs nicer
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 = [
"--includedir=$(dev)/include"
"--libdir=$(lib)/lib"
];
stripHeaderPathHook = makeSetupHook { } ./strip-header-path.sh;
in
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
}